Example Apps to Demonstrate Argo CD
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.2 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: curl
onExit: exit-handler # invoke the whalesay template
templates:
- name: curl # name of the template
container:
image: curlimages/curl
command: [curl]
args: ["--url", "helm-socks-frontend-int.sock-shop-front-end"]
- 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!"]