Skip to content

Commit

Permalink
Merge pull request #241 from bluelabsio/RM-80-Create-Slack-notificati…
Browse files Browse the repository at this point in the history
…on-for-when-main-build-breaks

RM-80 add slack notifications for fail and deploy
  • Loading branch information
ryantimjohn authored Apr 24, 2023
2 parents b591b4e + df13dac commit 1be56de
Showing 1 changed file with 59 additions and 1 deletion.
60 changes: 59 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ quality_gem_version: &quality_gem_version python-37

orbs:
quality: bluelabs/[email protected]
slack: circleci/[email protected]

commands:
installvenv:
Expand Down Expand Up @@ -160,6 +161,12 @@ jobs:
path: cover.tar.gz
- store_artifacts:
path: typecover.tar.gz
- slack/notify:
event: fail
branch_pattern: main
channel: engineering-general
mentions: '<@bruno.castrokarney>'
template: basic_fail_1

integration_test_with_dbs:
parameters:
Expand Down Expand Up @@ -254,6 +261,12 @@ jobs:
path: test-reports
- store_artifacts:
path: test-reports
- slack/notify:
event: fail
branch_pattern: main
channel: engineering-general
mentions: '<@bruno.castrokarney>'
template: basic_fail_1

integration_test:
parameters:
Expand Down Expand Up @@ -318,6 +331,12 @@ jobs:
path: test-reports
- store_artifacts:
path: test-reports
- slack/notify:
event: fail
branch_pattern: main
channel: engineering-general
mentions: '<@bruno.castrokarney>'
template: basic_fail_1

deploy:
parameters:
Expand Down Expand Up @@ -366,6 +385,17 @@ jobs:
command: |
. venv/bin/activate
twine upload -r pypi dist/*
- slack/notify:
event: fail
branch_pattern: main
channel: engineering-general
mentions: '<@bruno.castrokarney>'
template: basic_fail_1
- slack/notify:
event: pass
channel: engineering-general
template: success_tagged_deploy_1

cli-extra-test:
docker:
- image: cimg/python:3.9
Expand All @@ -384,6 +414,12 @@ jobs:
. venv/bin/activate
mvrec --help
mvrec
- slack/notify:
event: fail
branch_pattern: main
channel: engineering-general
mentions: '<@bruno.castrokarney>'
template: basic_fail_1

workflows:
version: 2
Expand All @@ -402,6 +438,7 @@ workflows:
extras: '[unittest,typecheck]'
python_version: "3.7"
pandas_version: "==1.1.5"
context: slack-secrets
filters:
tags:
only: /v\d+\.\d+\.\d+(-[\w]+)?/
Expand All @@ -410,6 +447,7 @@ workflows:
extras: '[unittest,typecheck]'
python_version: "3.8"
pandas_version: "==1.1.5"
context: slack-secrets
filters:
tags:
only: /v\d+\.\d+\.\d+(-[\w]+)?/
Expand All @@ -418,6 +456,7 @@ workflows:
extras: '[unittest,typecheck]'
python_version: "3.9"
pandas_version: "==1.1.5"
context: slack-secrets
coverage: true
filters:
tags:
Expand All @@ -427,6 +466,7 @@ workflows:
extras: '[unittest,typecheck]'
python_version: "3.10"
pandas_version: "==1.5.2"
context: slack-secrets
coverage: true
filters:
tags:
Expand All @@ -436,6 +476,7 @@ workflows:
extras: '[unittest,typecheck]'
python_version: "3.10"
pandas_version: "==1.5.2"
context: slack-secrets
coverage: true
filters:
tags:
Expand All @@ -444,6 +485,7 @@ workflows:
name: vertica-no-s3-itest
extras: '[vertica,itest]'
python_version: "3.9"
context: slack-secrets
command: |
. venv/bin/activate
export PATH=${PATH}:${PWD}/tests/integration/bin:/opt/vertica/bin
Expand All @@ -465,6 +507,7 @@ workflows:
extras: '[postgres-binary,itest]'
python_version: "3.9"
pandas_version: '==1.3.5'
context: slack-secrets
command: |
. venv/bin/activate
export PATH=${PATH}:${PWD}/tests/integration/bin:/opt/vertica/bin
Expand All @@ -485,6 +528,7 @@ workflows:
#
# See https://github.com/bluelabsio/records-mover/pull/152
pandas_version: "==1.1.5"
context: slack-secrets
command: |
. venv/bin/activate
export PATH=${PATH}:${PWD}/tests/integration/bin:/opt/vertica/bin
Expand All @@ -500,6 +544,7 @@ workflows:
name: vertica-s3-itest
extras: '[vertica,aws,itest]'
python_version: "3.9"
context: slack-secrets
command: |
. venv/bin/activate
export PATH=${PATH}:${PWD}/tests/integration/bin:/opt/vertica/bin
Expand All @@ -515,6 +560,7 @@ workflows:
name: cli-1-itest
extras: '[cli,gsheets,vertica]'
python_version: "3.9"
context: slack-secrets
command: |
. venv/bin/activate
export PATH=${PATH}:${PWD}/tests/integration/bin:/opt/vertica/bin
Expand All @@ -530,6 +576,7 @@ workflows:
name: cli-2-itest
extras: '[cli,gsheets,vertica]'
python_version: "3.9"
context: slack-secrets
command: |
. venv/bin/activate
export PATH=${PATH}:${PWD}/tests/integration/bin:/opt/vertica/bin
Expand All @@ -545,6 +592,7 @@ workflows:
name: cli-3-itest
extras: '[cli,gsheets,vertica]'
python_version: "3.9"
context: slack-secrets
command: |
. venv/bin/activate
export PATH=${PATH}:${PWD}/tests/integration/bin:/opt/vertica/bin
Expand All @@ -560,6 +608,7 @@ workflows:
name: redshift-s3-itest
extras: '[redshift-binary,itest]'
python_version: "3.9"
context: slack-secrets
db_name: demo-itest
filters:
tags:
Expand All @@ -568,6 +617,7 @@ workflows:
name: redshift-no-s3-itest
extras: '[redshift-binary,itest]'
python_version: "3.9"
context: slack-secrets
db_name: demo-itest
include_s3_scratch_bucket: false
filters:
Expand All @@ -579,6 +629,7 @@ workflows:
python_version: "3.8"
pandas_version: "<1"
numpy_version: "<1.24"
context: slack-secrets
db_name: demo-itest
filters:
tags:
Expand All @@ -588,6 +639,7 @@ workflows:
extras: '[redshift-binary,itest]'
python_version: "3.9"
pandas_version: ""
context: slack-secrets
db_name: demo-itest
filters:
tags:
Expand All @@ -597,6 +649,7 @@ workflows:
extras: '[literally_every_single_database_binary,itest]'
python_version: "3.9"
pandas_version: "==1.1.5"
context: slack-secrets
command: |
. venv/bin/activate
export PATH=${PATH}:${PWD}/tests/integration/bin:/opt/vertica/bin
Expand All @@ -609,6 +662,7 @@ workflows:
name: bigquery-no-gcs-itest
extras: '[bigquery,itest]'
python_version: "3.9"
context: slack-secrets
db_name: bltoolsdevbq-bq_itest
include_gcs_scratch_bucket: false
filters:
Expand All @@ -618,14 +672,18 @@ workflows:
name: bigquery-gcs-itest
extras: '[bigquery,itest]'
python_version: "3.9"
context: slack-secrets
db_name: bltoolsdevbq-bq_itest
filters:
tags:
only: /v\d+\.\d+\.\d+(-[\w]+)?/
- cli-extra-test:
name: cli-extra-test
context: slack-secrets
- deploy:
context: PyPI
context:
- PyPI
- slack-secrets
requires:
- test-3.7
- test-3.8
Expand Down

0 comments on commit 1be56de

Please sign in to comment.