Skip to content

Commit

Permalink
Refactor slack deploy notifications with webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
VirginiaDooley committed May 2, 2024
1 parent 24ec20b commit 8fb480a
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,6 @@ jobs:
command: |
. .venv/bin/activate
make lambda-migrate
# In the event the deployment has failed, alert the dev team
- slack/notify:
event: fail
template: basic_fail_1
code_deploy:
docker:
Expand Down Expand Up @@ -248,12 +244,14 @@ jobs:
DESIRED_CAPACITY=<<parameters.desired-capacity>> \
python deploy/update_auto_scaling_group.py
no_output_timeout: 15m # TODO reduce/discuss what is suitable?
# In the event the deployment has failed, alert the dev team
- slack/notify:
event: fail
template: basic_fail_1
channel: $SLACK_DEFAULT_CHANNEL

- run:
name: Send failure notification
command: |
if [ "$CIRCLE_JOB" = "code_deploy" ]; then
curl -X POST -H 'Content-type: application/json' --data '{"text":"The job has failed."}' https://hooks.slack.com/services/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
fi
when: on_fail


workflows:
main:
Expand Down

0 comments on commit 8fb480a

Please sign in to comment.