From 3d4eb66bf6cdbcff81498e2217cc5682cf1ff9a1 Mon Sep 17 00:00:00 2001 From: Mat Brady <matbr8dy@gmail.com> Date: Wed, 16 Mar 2022 10:12:00 -0400 Subject: [PATCH 1/4] ci: add slack notifications --- .circleci/config.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0a9d052c..a2772963 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,7 +35,9 @@ defaults: &defaults ADMIN_USERNAME: admin TERM: dumb -version: 2 +version: 2.1 +orbs: + slack: circleci/slack@4.8.3 jobs: configure_env_vars: <<: *defaults @@ -182,6 +184,9 @@ jobs: name: deploy to Pantheon command: ./.ci/deploy/pantheon/dev-multidev + - slack/notify: + event: pass + behat_test: <<: *defaults steps: @@ -273,6 +278,7 @@ workflows: - build_yarn - build_php - deploy_to_pantheon: + context: slack requires: # - static_tests - build_yarn From 307fcde1db6979b882a00e890d073e203cf6430a Mon Sep 17 00:00:00 2001 From: Mat Brady <matbr8dy@gmail.com> Date: Wed, 16 Mar 2022 10:15:38 -0400 Subject: [PATCH 2/4] improvment: always send notifications --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index a2772963..858ec103 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -185,7 +185,7 @@ jobs: command: ./.ci/deploy/pantheon/dev-multidev - slack/notify: - event: pass + event: always behat_test: <<: *defaults From 07f8269d109019181f182c4b3e8cb454a687340e Mon Sep 17 00:00:00 2001 From: Mat Brady <matbr8dy@gmail.com> Date: Wed, 16 Mar 2022 14:35:21 -0400 Subject: [PATCH 3/4] ci: add job errors to slack notifications --- .circleci/config.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 858ec103..1284128f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -123,6 +123,9 @@ jobs: paths: - web - vendor + + - slack/notify: + event: error build_yarn: <<: *defaults @@ -158,6 +161,9 @@ jobs: # Must be relative path from root paths: - web/wp-content/themes/sage/dist + + - slack/notify: + event: error deploy_to_pantheon: <<: *defaults From 14a664a1e231154a8af39936857d338d032ae5f0 Mon Sep 17 00:00:00 2001 From: Mat Brady <matbr8dy@gmail.com> Date: Wed, 16 Mar 2022 14:42:45 -0400 Subject: [PATCH 4/4] fix,ci: slack message type --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1284128f..750656c2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -125,7 +125,7 @@ jobs: - vendor - slack/notify: - event: error + event: fail build_yarn: <<: *defaults @@ -163,7 +163,7 @@ jobs: - web/wp-content/themes/sage/dist - slack/notify: - event: error + event: fail deploy_to_pantheon: <<: *defaults