Skip to content

Commit f0b3a45

Browse files
Nhi Nguyennhi-nguyen
authored andcommitted
Send Slack notifications on failed builds on master only
1 parent 65e4d38 commit f0b3a45

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

.circleci/config.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ jobs:
1010
- restore_cache:
1111
key: maven-dep-cache-{{ checksum "pom.xml" }}
1212
- run: mvn spotless:check animal-sniffer:check test verify
13+
- run:
14+
name: Test Failed
15+
when: on_fail
16+
command: |
17+
wget https://raw.githubusercontent.com/segmentio/circleci-notifications/master/slack-notify-branch.sh
18+
chmod u+x slack-notify-branch.sh
19+
BUILD_STATUS="Failed" NOTIFY_BRANCH="master" ./slack-notify-branch.sh
1320
- run: mvn package -B
1421
- save_cache:
1522
key: maven-dep-cache-{{ checksum "pom.xml" }}

0 commit comments

Comments
 (0)