Skip to content

Commit

Permalink
Add success + failure script notification (#49)
Browse files Browse the repository at this point in the history
* Add failure notification

[ci skip]

* Success Message Notification

[skip ci]

* Add success + failure shell script

* Fix rcpt address

* Fix rcpt address
  • Loading branch information
Eric Qian authored Jan 7, 2017
1 parent b4b4b6f commit 8262962
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ install:
- "./Scripts/install.sh"
script:
- "./Scripts/build.sh"
after_success:
- chmod 777 ./Scripts/after_success.sh
- "./Scripts/after_success.sh"
after_failure:
- chmod 777 ./Scripts/after_failure.sh
- "./Scripts/after_failure.sh"
branches:
only:
- master
Expand Down
10 changes: 10 additions & 0 deletions Scripts/after_failure.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /bin/sh

echo "Build Failed! Sending Notification Message. Please Wait"
curl -s --user 'api:key-***REMOVED***' \
https://api.mailgun.net/v3/m.enumc.com/messages \
-F from='API Travis <[email protected]>' \
-F to='2TBS Developers <[email protected]>' \
-F subject='TowerRush Build Failed - Travis CI' \
-F text='Travis build failed. This is a notification message. No reply.'
echo "Curl request sent!"
10 changes: 10 additions & 0 deletions Scripts/after_success.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /bin/sh

echo "Build Success! Sending Notification Message. Please Wait"
curl -s --user 'api:key-***REMOVED***' \
https://api.mailgun.net/v3/m.enumc.com/messages \
-F from='API Travis <[email protected]>' \
-F to='2TBS Developers <[email protected]>' \
-F subject='TowerRush Build Succeeded - Travis CI' \
-F text='Travis build Succeeded. This is a notification message. No reply.'
echo "Curl request sent!"

0 comments on commit 8262962

Please sign in to comment.