File tree Expand file tree Collapse file tree 1 file changed +48
-8
lines changed Expand file tree Collapse file tree 1 file changed +48
-8
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,56 @@ orbs:
13131414151516+ 1617parameters :
1718 ACC_TESTS :
1819 type : string
1920 description : manually run acceptance tests
2021 default : ' 0'
22+ commands :
23+ notify_slack_on_failure :
24+ steps :
25+ - slack/notify :
26+ channel : team-cloud-context-alerts
27+ event : fail
28+ custom : |
29+ {
30+ "blocks": [
31+ {
32+ "type": "header",
33+ "text": {
34+ "type": "plain_text",
35+ "text": ":warning: Driftctl acceptance tests failed :warning:",
36+ "emoji": true
37+ }
38+ },
39+ {
40+ "type": "divider"
41+ },
42+ {
43+ "type": "section",
44+ "fields": [
45+ {
46+ "type": "mrkdwn",
47+ "text": "*Suite*: ${ACC_PATTERN}"
48+ },
49+ {
50+ "type": "mrkdwn",
51+ "text": "*Branch*: ${CIRCLE_BRANCH}"
52+ }
53+ ],
54+ "accessory": {
55+ "type": "button",
56+ "text": {
57+ "type": "plain_text",
58+ "emoji": true,
59+ "text": "View Job"
60+ },
61+ "value": "${CIRCLE_BUILD_URL}"
62+ }
63+ }
64+ ]
65+ }
2166jobs :
2267 test_acc :
2368 parameters :
4994 name : Run acceptance tests
5095 command : make acc
5196 no_output_timeout : 30m
52- - run :
53- name : Discord notification
54- when : on_fail
55- command : |
56- curl -X POST \
57- -H "Content-Type: application/json" \
58- -d "{\"content\": \"❌ Acceptance tests failed\nSuite: ${ACC_PATTERN}\n<${CIRCLE_BUILD_URL}>\" }"\
59- ${DISCORD_WEBHOOK}
97+ - notify_slack_on_failure
6098 - go/save-cache :
6199 key : test_acc
62100 path : /home/circleci/.go_workspace/pkg/mod
@@ -237,6 +275,7 @@ workflows:
237275 # - TestAcc_Github_
238276 context :
239277 - driftctl-acc
278+ - snyk-bot-slack
240279 triggers :
241280 - schedule :
242281 cron : " 0 3 * * *"
@@ -262,6 +301,7 @@ workflows:
262301 # - TestAcc_Github_
263302 context :
264303 - driftctl-acc
304+ - snyk-bot-slack
265305 pullrequest :
266306 jobs :
267307 - lint :
You can’t perform that action at this time.
0 commit comments