diff --git a/.travis.yml b/.travis.yml index a82ecf1..ea135e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,15 +3,25 @@ osx_image: xcode61 sudo: true rvm: - 2.1.2 +cache: + timeout: 1000 + directories: + - /Applications/Unity/ before_install: - chmod 777 ./Scripts/before_install.sh - "./Scripts/before_install.sh" - chmod 777 ./Scripts/after_deploy.sh - "./Scripts/after_deploy.sh" #Running after_deploy to list env vars before init -install: +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 diff --git a/Scripts/after_failure.sh b/Scripts/after_failure.sh new file mode 100644 index 0000000..03baf9b --- /dev/null +++ b/Scripts/after_failure.sh @@ -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 ' \ + -F to='2TBS Developers ' \ + -F subject='TowerRush Build Failed - Travis CI' \ + -F text='Travis build failed. This is a notification message. No reply.' +echo "Curl request sent!" diff --git a/Scripts/after_success.sh b/Scripts/after_success.sh new file mode 100644 index 0000000..b01ece5 --- /dev/null +++ b/Scripts/after_success.sh @@ -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 ' \ + -F to='2TBS Developers ' \ + -F subject='TowerRush Build Succeeded - Travis CI' \ + -F text='Travis build Succeeded. This is a notification message. No reply.' +echo "Curl request sent!"