|
|
@ -6,36 +6,37 @@ metadata: |
|
|
|
argocd.argoproj.io/hook: PostSync |
|
|
|
# argocd.argoproj.io/hook-delete-policy: HookSucceeded |
|
|
|
spec: |
|
|
|
entrypoint: check-service-up |
|
|
|
onExit: exit-handler |
|
|
|
entrypoint: whalesay |
|
|
|
onExit: exit-handler # invoke the whalesay template |
|
|
|
templates: |
|
|
|
- name: check-service-up |
|
|
|
- name: whalesay # name of the template |
|
|
|
container: |
|
|
|
image: curlimages/curl |
|
|
|
command: |
|
|
|
- curl |
|
|
|
- '-v' |
|
|
|
- '-X GET' |
|
|
|
- 'helm-socks-frontend-int.sock-shop-front-end' |
|
|
|
image: docker/whalesay |
|
|
|
command: [cowsay] |
|
|
|
args: ["hello world"] |
|
|
|
|
|
|
|
- name: exit-handler |
|
|
|
steps: |
|
|
|
- - name: notify |
|
|
|
template: send-status-webhook |
|
|
|
arguments: |
|
|
|
parameters: |
|
|
|
- name: status |
|
|
|
value: "{{ `{{ workflow.status }}` }}" |
|
|
|
|
|
|
|
- name: send-status-webhook |
|
|
|
inputs: |
|
|
|
parameters: |
|
|
|
- name: status |
|
|
|
template: send-email |
|
|
|
- name: celebrate |
|
|
|
template: celebrate |
|
|
|
when: "{{workflow.status}} == Succeeded" |
|
|
|
- name: cry |
|
|
|
template: cry |
|
|
|
when: "{{workflow.status}} != Succeeded" |
|
|
|
- name: send-email |
|
|
|
container: |
|
|
|
image: alpine:latest |
|
|
|
command: [sh, -c] |
|
|
|
args: ["echo send e-mail: {{workflow.name}} {{workflow.status}}"] |
|
|
|
- name: celebrate |
|
|
|
container: |
|
|
|
image: alpine:latest |
|
|
|
command: [sh, -c] |
|
|
|
args: ["echo hooray!"] |
|
|
|
- name: cry |
|
|
|
container: |
|
|
|
image: curlimages/curl |
|
|
|
command: |
|
|
|
- curl |
|
|
|
- '-v' |
|
|
|
- '-X POST' |
|
|
|
- '-d foo' |
|
|
|
- 'https://webhook.site/c1d94793-b1b1-424b-b412-3f429a6825bb' |
|
|
|
image: alpine:latest |
|
|
|
command: [sh, -c] |
|
|
|
args: ["echo boohoo!"] |
|
|
|