Skip to content

Commit bebef71

Browse files
committedNov 21, 2022
Notify CI failures on Slack
We use the circleci/slack orb [1] to notify whenever a CircleCI job fails. All jobs are included. Currently, the CircleCI context has been configured to point to the '#ci-notifications' [2] channel on Solidus' Slack workspace [3], where we have created the required Slack app [4]. [1] - https://circleci.com/developer/orbs/orb/circleci/slack [2] - https://solidusio.slack.com/archives/C04C337T6P2 [3] - https://solidusio.slack.com [4] - https://circleci.com/docs/slack-orb-tutorial/
1 parent c4c63bf commit bebef71

File tree

1 file changed

+28
-7
lines changed

1 file changed

+28
-7
lines changed
 

‎.circleci/config.yml

+28-7
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ orbs:
1010
# or goes EOL.
1111
solidusio_extensions: solidusio/extensions@volatile
1212

13+
slack: circleci/slack@4.9.3
14+
15+
commands:
16+
notify:
17+
steps:
18+
- slack/notify:
19+
event: fail
20+
template: basic_fail_1
21+
branch_pattern: master
22+
1323
jobs:
1424
run-specs-with-postgres:
1525
executor:
@@ -20,6 +30,7 @@ jobs:
2030
- browser-tools/install-chrome
2131
- solidusio_extensions/run-tests-solidus-master
2232
- solidusio_extensions/store-test-results
33+
- notify
2334

2435
run-specs-with-mysql:
2536
executor:
@@ -30,6 +41,7 @@ jobs:
3041
- browser-tools/install-chrome
3142
- solidusio_extensions/run-tests-solidus-current
3243
- solidusio_extensions/store-test-results
44+
- notify
3345

3446
run-specs-with-sqlite:
3547
executor:
@@ -40,19 +52,25 @@ jobs:
4052
- browser-tools/install-chrome
4153
- solidusio_extensions/run-tests-solidus-older
4254
- solidusio_extensions/store-test-results
55+
- notify
4356

4457
lint-code:
4558
executor: solidusio_extensions/sqlite
4659
steps:
4760
- solidusio_extensions/lint-code
61+
- notify
4862

4963
workflows:
5064
"Run specs on supported Solidus versions":
5165
jobs:
52-
- run-specs-with-postgres
53-
- run-specs-with-mysql
54-
- run-specs-with-sqlite
55-
- lint-code
66+
- run-specs-with-postgres:
67+
context: slack-secrets
68+
- run-specs-with-mysql:
69+
context: slack-secrets
70+
- run-specs-with-sqlite:
71+
context: slack-secrets
72+
- lint-code:
73+
context: slack-secrets
5674

5775
"Weekly run specs against master":
5876
triggers:
@@ -63,6 +81,9 @@ workflows:
6381
only:
6482
- master
6583
jobs:
66-
- run-specs-with-postgres
67-
- run-specs-with-mysql
68-
- run-specs-with-sqlite
84+
- run-specs-with-postgres:
85+
context: slack-secrets
86+
- run-specs-with-mysql:
87+
context: slack-secrets
88+
- run-specs-with-sqlite:
89+
context: slack-secrets

0 commit comments

Comments
 (0)
Please sign in to comment.