github.com/argoproj/argo-cd/v3@v3.2.1/notifications_catalog/templates/app-sync-failed.yaml (about)

     1  message: |
     2      {{if eq .serviceType "slack"}}:exclamation:{{end}}  The sync operation of application {{.app.metadata.name}} has failed at {{.app.status.operationState.finishedAt}} with the following error: {{.app.status.operationState.message}}
     3      Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .
     4  email:
     5      subject: Failed to sync application {{.app.metadata.name}}.
     6  slack:
     7      attachments: |
     8          [{
     9            "title": "{{ .app.metadata.name}}",
    10            "title_link":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}",
    11            "color": "#E96D76",
    12            "fields": [
    13            {
    14              "title": "Sync Status",
    15              "value": "{{.app.status.sync.status}}",
    16              "short": true
    17            },
    18            {
    19              "title": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
    20              "value": {{- if .app.spec.source }} ":arrow_heading_up: {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}:arrow_heading_up: {{ $source.repoURL }}{{- end }}" {{- end }},
    21              "short": true
    22            }
    23            {{range $index, $c := .app.status.conditions}}
    24            ,
    25            {
    26              "title": "{{$c.type}}",
    27              "value": "{{$c.message}}",
    28              "short": true
    29            }
    30            {{end}}
    31            ]
    32          }]
    33  teams:
    34      themeColor: "#FF0000"
    35      title: Failed to sync application {{.app.metadata.name}}.
    36      facts: |
    37          [{
    38            "name": "Sync Status",
    39            "value": "{{.app.status.sync.status}}"
    40          },
    41          {
    42            "name": "Failed at",
    43            "value": "{{.app.status.operationState.finishedAt}}"
    44          },
    45          {
    46            "name": {{- if .app.spec.source }} "Repository" {{- else if .app.spec.sources }} "Repositories" {{- end }},
    47            "value": {{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}⬆️ {{ $source.repoURL }}{{- end }}" {{- end }}
    48          }
    49          {{range $index, $c := .app.status.conditions}}
    50            ,
    51            {
    52              "name": "{{$c.type}}",
    53              "value": "{{$c.message}}"
    54            }
    55          {{end}}
    56          ]
    57      potentialAction: |
    58          [{
    59            "@type":"OpenUri",
    60            "name":"Open Operation",
    61            "targets":[{
    62              "os":"default",
    63              "uri":"{{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true"
    64            }]
    65          },
    66          {
    67            "@type":"OpenUri",
    68            "name":"Open Repository",
    69            "targets":[{
    70              "os":"default",
    71              "uri":{{- if .app.spec.source }} "⬆️ {{ .app.spec.source.repoURL }}" {{- else if .app.spec.sources }} "{{- range $index, $source := .app.spec.sources }}{{ if $index }}\n{{ end }}{{ $source.repoURL }}⬆️ {{- end }}" {{- end }}
    72            }]
    73          }]