Repository navigation
How to pass the image version in the notification #13615
|
Hi, Thx |
Answered by
adiii717
Jul 10, 2023
Replies: 3 comments 14 replies
|
Have you tried fetching that value from the application status field, i.e. with something like this: template.app-sync-succeeded: |
email:
subject: Application {{.app.metadata.name}} has been successfully synced.
message: |
{{if eq .serviceType “slack”}}:white_check_mark:{{end}} Application {{.app.metadata.name}} has been successfully synced at {{.app.status.operationState.finishedAt}}.
Sync operation details are available at: {{.context.argocdUrl}}/applications/{{.app.metadata.name}}?operation=true .
slack:
attachments: |
[{
“title”: “{{.app.metadata.name}} {{ $image := first .app.status.summary.images }}{{ $list := splitList “:” $image }}{{ index $list 1 }}“, |
2 replies
Answer selected by
andrii-korotkov-verkada
|
ok, what if i only want the :1.0 the version part only ... not the whole url ? is there a way to truncate that string ? regex maybe ? |
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

This works for me