You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
42 lines
1.1 KiB
42 lines
1.1 KiB
apiVersion: argoproj.io/v1alpha1
|
|
kind: Workflow
|
|
metadata:
|
|
name: "{{ include "helm-socks-frontend.name" . }}-workflow"
|
|
annotations:
|
|
argocd.argoproj.io/hook: PostSync
|
|
# argocd.argoproj.io/hook-delete-policy: HookSucceeded
|
|
spec:
|
|
entrypoint: whalesay
|
|
onExit: exit-handler # invoke the whalesay template
|
|
templates:
|
|
- name: whalesay # name of the template
|
|
container:
|
|
image: docker/whalesay
|
|
command: [cowsay]
|
|
args: ["hello world"]
|
|
|
|
- name: exit-handler
|
|
steps:
|
|
- - name: notify
|
|
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: alpine:latest
|
|
command: [sh, -c]
|
|
args: ["echo boohoo!"]
|
|
|