How to pass the image version in the notification #13615
Unanswered
radimpaseka
asked this question in
Q&A
Replies: 3 comments 10 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 }}“, |
Beta Was this translation helpful? Give feedback.
2 replies
-
This works for me
|
Beta Was this translation helpful? Give feedback.
4 replies
-
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 ? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm trying to pass the image version in the notification when new deployment happen, I cannot find any doc what is possible. In the samples I see .app.metadata. parameter, .app.spec.source parameters, etc. is there any documentation what parameters are available?
How can I pass the parameter with image version which has been deployed?
Thx
Beta Was this translation helpful? Give feedback.
All reactions