Skip to content

Commit e2634c5

Browse files
committed
Add slack notification job config in CircleCI
1 parent 9966f92 commit e2634c5

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.circleci/config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,20 @@ jobs:
100100
command: |
101101
#kubectl patch statefulset pythonrestapi --type='json' -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/image", "value":"'$AWS_ACCOUNT_ID'.dkr.ecr.ap-southeast-1.amazonaws.com/pythonrestapi:'$CIRCLE_BUILD_NUM_DOCKER'"}]'
102102
kubectl set image sts/pythonrestapi pythonrestapi=$AWS_ACCOUNT_ID.dkr.ecr.ap-southeast-1.amazonaws.com/pythonrestapi:$CIRCLE_BUILD_NUM_DOCKER
103+
notification:
104+
docker:
105+
- image: "cimg/base:stable"
106+
auth:
107+
username: $DOCKER_USER
108+
password: $DOCKER_PASS # context / project UI env-var reference
109+
steps:
110+
- slack/notify:
111+
event: fail
112+
template: basic_fail_1
113+
- slack/notify:
114+
event: pass
115+
template: success_tagged_deploy_1
116+
103117
workflows:
104118
main:
105119
jobs:
@@ -110,3 +124,8 @@ workflows:
110124
# filters:
111125
# branches:
112126
# only: master
127+
# - notification:
128+
# context: slack-secrets
129+
# name: BuyerPortal2.0
130+
# requires:
131+
# - BuildTestAndDeploy

0 commit comments

Comments
 (0)