Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.

Commit 8ce348c

Browse files
authored
Add notifications on build failures (#1923)
1 parent da008ba commit 8ce348c

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ language: dart
77
dart:
88
- dev
99

10+
after_failure:
11+
- tool/report_failure.sh
12+
1013
# Only building master means that we don't run two builds for each pull request.
1114
branches:
1215
only: [master]

dev/tool/travis/prefix.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ language: dart
77
dart:
88
- dev
99

10+
after_failure:
11+
- tool/report_failure.sh
12+
1013
# Only building master means that we don't run two builds for each pull request.
1114
branches:
1215
only: [master]

tool/report_failure.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
if [ "$TRAVIS_EVENT_TYPE" != "pull_request" ] && [ "$TRAVIS_ALLOW_FAILURE" != "true" ]; then
3+
curl -H "Content-Type: application/json" -X POST -d \
4+
"{'text':'Build failed! ${TRAVIS_BUILD_WEB_URL}'}" \
5+
"${CHAT_HOOK_URI}"
6+
fi

0 commit comments

Comments
 (0)