Skip to content

Commit

Permalink
Merge pull request #97 from openinfradev/add_notification
Browse files Browse the repository at this point in the history
add slack notification to E2E test workflow
  • Loading branch information
zugwan authored Jun 22, 2022
2 parents 7c75045 + 440b5d1 commit 2b4aaaf
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/tks-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: argo
spec:
entrypoint: main
onExit: notify-slack
arguments:
parameters:
- name: tks_info_url
Expand Down Expand Up @@ -166,6 +167,10 @@ spec:
value: "{{steps.call-create-usercluster.outputs.parameters.cluster-id}}"
# TODO: cleaup remaining AWS resources

#######################
# Template Definition #
#######################

- name: create-tks-client-conf
container:
name: create-tks-client-conf
Expand Down Expand Up @@ -345,3 +350,18 @@ spec:
fi
sleep 1m
done
- name: notify-slack
container:
image: centos:centos7
env:
- name: SLACK_WEBHOOK_URL
valueFrom:
secretKeyRef:
name: tks-slack-webhook-secret
key: url
command:
- /bin/bash
- '-exc'
- |
curl -X POST -H 'Content-type: application/json' --data '{"text": "**************** E2E Test Result ****************\nWorkflow: {{workflow.name}}\nStatus: {{workflow.status}}\nDuration: {{workflow.duration}}" }' $SLACK_WEBHOOK_URL

0 comments on commit 2b4aaaf

Please sign in to comment.