diff --git a/.circleci/config.yml b/.circleci/config.yml index 96ed2598f..3efe3b931 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -72,6 +72,34 @@ defaults: name: docs pragma version check command: ./scripts/docs_version_pragma_check.sh + # -------------------------------------------------------------------------- + # Notification Templates + - gitter_notify_failure_unless_pr: &gitter_notify_failure_unless_pr + name: Gitter notify failure (if not running on a PR) + command: | + if [[ $CI_PULL_REQUEST == "" ]] + then + curl -X POST -i \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer $GITTER_API_TOKEN" "https://api.gitter.im/v1/rooms/$GITTER_NOTIFY_ROOM_ID/chatMessages" \ + -d '{"text":" ❌ Nightly job **'$CIRCLE_JOB'** failed on **'$CIRCLE_BRANCH'**. Please see '$CIRCLE_BUILD_URL' for details."}' + fi + when: on_fail + + - gitter_notify_success_unless_pr: &gitter_notify_success_unless_pr + name: Gitter notify success (if not running on a PR) + command: | + if [[ $CI_PULL_REQUEST == "" ]] + then + curl -X POST -i \ + -H "Content-Type: application/json" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer $GITTER_API_TOKEN" "https://api.gitter.im/v1/rooms/$GITTER_NOTIFY_ROOM_ID/chatMessages" \ + -d '{"text":" ✅ Nightly job **'$CIRCLE_JOB'** succeeded on **'$CIRCLE_BRANCH'**. Please see '$CIRCLE_BUILD_URL' for details."}' + fi + when: on_success + # -------------------------------------------------------------------------- # Artifacts Templates @@ -338,34 +366,6 @@ defaults: requires: - b_win_release - # -------------------------------------------------------------------------- - # Notification Templates - - gitter_notify_failure_unless_pr: &gitter_notify_failure_unless_pr - name: Gitter notify failure (if not running on a PR) - command: | - if [[ $CI_PULL_REQUEST == "" ]] - then - curl -X POST -i \ - -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -H "Authorization: Bearer $GITTER_API_TOKEN" "https://api.gitter.im/v1/rooms/$GITTER_NOTIFY_ROOM_ID/chatMessages" \ - -d '{"text":" ❌ Nightly job **'$CIRCLE_JOB'** failed on **'$CIRCLE_BRANCH'**. Please see '$CIRCLE_BUILD_URL' for details."}' - fi - when: on_fail - - - gitter_notify_success_unless_pr: &gitter_notify_success_unless_pr - name: Gitter notify success (if not running on a PR) - command: | - if [[ $CI_PULL_REQUEST == "" ]] - then - curl -X POST -i \ - -H "Content-Type: application/json" \ - -H "Accept: application/json" \ - -H "Authorization: Bearer $GITTER_API_TOKEN" "https://api.gitter.im/v1/rooms/$GITTER_NOTIFY_ROOM_ID/chatMessages" \ - -d '{"text":" ✅ Nightly job **'$CIRCLE_JOB'** succeeded on **'$CIRCLE_BRANCH'**. Please see '$CIRCLE_BUILD_URL' for details."}' - fi - when: on_success - # ----------------------------------------------------------------------------------------------- jobs: