Skip to content

Commit 5cb86c8

Browse files
Remove Slack notifications for CI failures
We were storing the Slack secrets on a CircleCI context [1]. Although we were also passing them to forks [2], it resulted on unauthorized builds for external contributions. We could work around the issue in two ways: - Having the secrets outside of any context, but that would compromise the security of the associated Slack channel for: - Send messages as @circleci notifications - Send messages to channels @circleci notifications isn't a member of - Upload, edit, and delete files as CircleCI notifications - Using CircleCI logic statements [3] to conditionally run jobs when `CIRCLECI_USERNAME` or `CIRCLE_PR_USERNAME` env vars [4] are in a list of allowed users. However, that would be something difficult to maintain, and there's no other way to check the user's role. Given that we don't find those trade-offs to be acceptable, we remove the integration for now. [1] - https://circleci.com/docs/contexts/ [2] - https://circleci.com/docs/oss/#pass-secrets-to-builds-from-forked-pull-requests [3] - https://circleci.com/docs/configuration-reference/#logic-statements [4] - https://circleci.com/docs/variables/
1 parent 55b738c commit 5cb86c8

1 file changed

Lines changed: 11 additions & 26 deletions

File tree

.circleci/config.yml

Lines changed: 11 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ orbs:
66
# to change this configuration every time a Solidus version is released
77
# or goes EOL.
88
solidusio_extensions: solidusio/extensions@volatile
9-
slack: circleci/slack@4.9.3
109

1110
commands:
1211
setup:
@@ -20,44 +19,33 @@ commands:
2019
gem install bundler -v '>=2.3.21' --conservative
2120
bundle --version
2221
23-
notify:
24-
steps:
25-
- slack/notify:
26-
event: fail
27-
template: basic_fail_1
28-
branch_pattern: master
29-
3022
jobs:
3123
solidus-master:
3224
executor:
3325
name: solidusio_extensions/sqlite
3426
ruby_version: '3.1'
35-
steps: ['setup', 'solidusio_extensions/run-tests-solidus-master', 'notify']
27+
steps: ['setup', 'solidusio_extensions/run-tests-solidus-master']
3628
solidus-current:
3729
executor:
3830
name: solidusio_extensions/sqlite
3931
ruby_version: '3.0'
40-
steps: ['setup', 'solidusio_extensions/run-tests-solidus-current', 'notify']
32+
steps: ['setup', 'solidusio_extensions/run-tests-solidus-current']
4133
solidus-older:
4234
executor:
4335
name: solidusio_extensions/sqlite
4436
ruby_version: '2.7'
45-
steps: ['setup', 'solidusio_extensions/run-tests-solidus-older', 'notify']
37+
steps: ['setup', 'solidusio_extensions/run-tests-solidus-older']
4638
lint-code:
4739
executor: solidusio_extensions/sqlite
48-
steps: ['setup', 'solidusio_extensions/lint-code', 'notify']
40+
steps: ['setup', 'solidusio_extensions/lint-code']
4941

5042
workflows:
5143
"Run specs on supported Solidus versions":
5244
jobs:
53-
- solidus-master:
54-
context: slack-secrets
55-
- solidus-current:
56-
context: slack-secrets
57-
- solidus-older:
58-
context: slack-secrets
59-
- lint-code:
60-
context: slack-secrets
45+
- solidus-master
46+
- solidus-current
47+
- solidus-older
48+
- lint-code
6149

6250
"Weekly run specs against master":
6351
triggers:
@@ -68,9 +56,6 @@ workflows:
6856
only:
6957
- master
7058
jobs:
71-
- solidus-master:
72-
context: slack-secrets
73-
- solidus-current:
74-
context: slack-secrets
75-
- solidus-older:
76-
context: slack-secrets
59+
- solidus-master
60+
- solidus-current
61+
- solidus-older

0 commit comments

Comments
 (0)