diff --git a/cronjob/Chart.yaml b/cronjob/Chart.yaml index 717f466..d2e8690 100644 --- a/cronjob/Chart.yaml +++ b/cronjob/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 description: Helm chart with simple cronjob template name: cronjob -version: 0.7.4 +version: 0.7.5 appVersion: 1.0.0 tillerVersion: ">=2.14.3" diff --git a/cronjob/templates/_exit_handler_slack_app.tpl b/cronjob/templates/_exit_handler_slack_app.tpl index f8a1478..44345ae 100644 --- a/cronjob/templates/_exit_handler_slack_app.tpl +++ b/cronjob/templates/_exit_handler_slack_app.tpl @@ -39,23 +39,7 @@ { \"type\": \"mrkdwn\", \"text\": \"*Duration*\\n{{ "{{" }}workflow.duration{{ "}}" }} sec\" - }, - { - \"type\": \"mrkdwn\", - \"text\": \"*Argo Dashboard*\\n<{{required "exitNotifications.slackApp.portalDomain must be provided" $slackApp.portalDomain}}/workflows/{{ "{{" }}workflow.namespace{{ "}}" }}/{{ "{{" }}workflow.name{{ "}}" }}?tab=workflow|View>\" } - {{- if $slackApp.customUrls }} - ,{ - \"type\": \"mrkdwn\", - {{ $max := add (len $slackApp.customUrls) -1 }} - \"text\": \"*Extra Links*\\n{{- range $index, $value := $slackApp.customUrls }} - {{- with $value }} - <{{ .url }}|{{ .title }}> - {{- if gt $max $index }},{{- end}} - {{- end }} - {{- end }}\" - } - {{- end }} ] } {{- if $slackApp.mention }} @@ -69,6 +53,34 @@ } {{- end }} {{- end }} + , + { + \"type\": \"actions\", + \"elements\": [ + { + \"type\": \"button\", + \"text\": { + \"type\": \"plain_text\", + \"text\": \"Argo Dashboard\" + }, + \"url\": \"{{required "exitNotifications.slackApp.portalDomain must be provided" $slackApp.portalDomain}}/workflows/{{ "{{" }}workflow.namespace{{ "}}" }}/{{ "{{" }}workflow.name{{ "}}" }}?tab=workflow\" + } + {{- if $slackApp.customUrls }} + {{- range $index, $value := $slackApp.customUrls }} + {{- with $value }} + ,{ + \"type\": \"button\", + \"text\": { + \"type\": \"plain_text\", + \"text\": \"{{.title}}\" + }, + \"url\": \"{{.url}}\" + } + {{- end }} + {{- end }} + {{- end }} + ] + } ] } ]}' @@ -113,23 +125,7 @@ { \"type\": \"mrkdwn\", \"text\": \"*Duration*\\n{{ "{{" }}workflow.duration{{ "}}" }} sec\" - }, - { - \"type\": \"mrkdwn\", - \"text\": \"*Argo Dashboard*\\n<{{required "exitNotifications.slackApp.portalDomain must be provided" $slackApp.portalDomain}}/workflows/{{ "{{" }}workflow.namespace{{ "}}" }}/{{ "{{" }}workflow.name{{ "}}" }}?tab=workflow|View>\" } - {{- if $slackApp.customUrls }} - ,{ - \"type\": \"mrkdwn\", - {{ $max := add (len $slackApp.customUrls) -1 }} - \"text\": \"*Extra Links*\\n{{- range $index, $value := $slackApp.customUrls }} - {{- with $value }} - <{{ .url }}|{{ .title }}> - {{- if gt $max $index }},{{- end}} - {{- end }} - {{- end }}\" - } - {{- end }} ] } {{- if $slackApp.mention }} @@ -152,6 +148,33 @@ } } {{- end }} + ,{ + \"type\": \"actions\", + \"elements\": [ + { + \"type\": \"button\", + \"text\": { + \"type\": \"plain_text\", + \"text\": \"Argo Dashboard\" + }, + \"url\": \"{{required "exitNotifications.slackApp.portalDomain must be provided" $slackApp.portalDomain}}/workflows/{{ "{{" }}workflow.namespace{{ "}}" }}/{{ "{{" }}workflow.name{{ "}}" }}?tab=workflow\" + } + {{- if $slackApp.customUrls }} + {{- range $index, $value := $slackApp.customUrls }} + {{- with $value }} + ,{ + \"type\": \"button\", + \"text\": { + \"type\": \"plain_text\", + \"text\": \"{{.title}}\" + }, + \"url\": \"{{.url}}\" + } + {{- end }} + {{- end }} + {{- end }} + ] + } ] } ]}'