From 51f344594d81d1cabfb475375f064d519ea66de0 Mon Sep 17 00:00:00 2001 From: "Petti, Ken" Date: Sun, 29 Mar 2020 09:22:34 -0400 Subject: [PATCH] test workflow --- .../templates/tests/workflow.yaml | 53 ++++++++++--------- 1 file changed, 27 insertions(+), 26 deletions(-) diff --git a/helm-socks-frontend/templates/tests/workflow.yaml b/helm-socks-frontend/templates/tests/workflow.yaml index 14adf53..c3c0471 100644 --- a/helm-socks-frontend/templates/tests/workflow.yaml +++ b/helm-socks-frontend/templates/tests/workflow.yaml @@ -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!"]