From 29df3b0ee28b7625b86a41a7931535dec1f9acbc Mon Sep 17 00:00:00 2001 From: George Kalpakas Date: Fri, 21 Jun 2019 23:49:04 +0300 Subject: [PATCH] ci: send `aio_monitoring` failure notifications to the `dev-infra-ci-failures` channel (#31202) PR Close #31202 --- .circleci/config.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0384f93ccd..15c34965f8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -535,11 +535,15 @@ jobs: name: Run tests against https://angular.io/ command: ./aio/scripts/test-production.sh https://angular.io/ $CI_AIO_MIN_PWA_SCORE - run: - name: Notify caretaker about failure - # `$SLACK_CARETAKER_WEBHOOK_URL` is a secret env var defined in CircleCI project settings. - # The URL comes from https://angular-team.slack.com/apps/A0F7VRE7N-circleci. - command: 'curl --request POST --header "Content-Type: application/json" --data "{\"text\":\":x: \`$CIRCLE_JOB\` job failed on build $CIRCLE_BUILD_NUM: $CIRCLE_BUILD_URL :scream:\"}" $SLACK_CARETAKER_WEBHOOK_URL' when: on_fail + name: Notify caretaker and dev-infra about failure + # `$SLACK_CARETAKER_WEBHOOK_URL` and `$SLACK_DEV_INFRA_CI_FAILURES_WEBHOOK` are secret env + # vars defined in CircleCI project settings. + # The URLs come from https://angular-team.slack.com/apps/A0F7VRE7N-circleci. + command: | + notificationJson="{\"text\":\":x: \`$CIRCLE_JOB\` job failed on build $CIRCLE_BUILD_NUM: $CIRCLE_BUILD_URL :scream:\"}" + curl --request POST --header "Content-Type: application/json" --data "$notificationJson" $SLACK_CARETAKER_WEBHOOK_URL + curl --request POST --header "Content-Type: application/json" --data "$notificationJson" $SLACK_DEV_INFRA_CI_FAILURES_WEBHOOK_URL aio_monitoring_next: <<: *job_defaults @@ -554,11 +558,15 @@ jobs: name: Run tests against https://next.angular.io/ command: ./aio/scripts/test-production.sh https://next.angular.io/ $CI_AIO_MIN_PWA_SCORE - run: - name: Notify caretaker about failure - # `$SLACK_CARETAKER_WEBHOOK_URL` is a secret env var defined in CircleCI project settings. - # The URL comes from https://angular-team.slack.com/apps/A0F7VRE7N-circleci. - command: 'curl --request POST --header "Content-Type: application/json" --data "{\"text\":\":x: \`$CIRCLE_JOB\` job failed on build $CIRCLE_BUILD_NUM: $CIRCLE_BUILD_URL :scream:\"}" $SLACK_CARETAKER_WEBHOOK_URL' when: on_fail + name: Notify caretaker and dev-infra about failure + # `$SLACK_CARETAKER_WEBHOOK_URL` and `$SLACK_DEV_INFRA_CI_FAILURES_WEBHOOK_URL` are secret env + # vars defined in CircleCI project settings. + # The URLs come from https://angular-team.slack.com/apps/A0F7VRE7N-circleci. + command: | + notificationJson="{\"text\":\":x: \`$CIRCLE_JOB\` job failed on build $CIRCLE_BUILD_NUM: $CIRCLE_BUILD_URL :scream:\"}" + curl --request POST --header "Content-Type: application/json" --data "$notificationJson" $SLACK_CARETAKER_WEBHOOK_URL + curl --request POST --header "Content-Type: application/json" --data "$notificationJson" $SLACK_DEV_INFRA_CI_FAILURES_WEBHOOK_URL legacy-unit-tests-saucelabs: <<: *job_defaults