From c8bd861f410b80072c1b906e28b1cafcce851453 Mon Sep 17 00:00:00 2001 From: Hannah Wolfe Date: Tue, 29 Jan 2019 13:22:08 +0000 Subject: [PATCH] Proper travis notification config --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 04cac68b99..1cbf8296ea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -61,7 +61,7 @@ after_success: echo "This is a PR. No coverage generated." fi -after_script: | - if [ "${TRAVIS_EVENT_TYPE}" != "cron" ]; then +after_failure: | + if [ "${TRAVIS_EVENT_TYPE}" == "cron" ]; then curl -X POST --data-urlencode "payload={\"attachments\": [{\"color\": \"danger\", \"fallback\": \"Build Failure: $TRAVIS_JOB_WEB_URL\", \"title\": \"Build Failure\", \"text\": \"$TRAVIS_JOB_WEB_URL\"}]}" $SLACK_URL fi