From ef6f94f4961f7dfe0ce097587392dd7ed5b69853 Mon Sep 17 00:00:00 2001 From: Johan Brandhorst-Satzkorn Date: Fri, 6 Jan 2023 13:45:02 -0600 Subject: [PATCH] chore: Remove unused CI job (#2764) --- .circleci/config.yml | 131 -------------------------------- .circleci/config/jobs/build.yml | 4 - 2 files changed, 135 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5164f6e7fa..710994ccba 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -159,133 +159,6 @@ jobs: make -C testing/dbtest/docker clean name: Cleanup when: always - - run: - command: | - echo 'export SLACK_BUILD_STATUS="fail"' >> $BASH_ENV - name: Slack - Setting Failure Condition - when: on_fail - - run: - command: | - echo 'export SLACK_BUILD_STATUS="success"' >> $BASH_ENV - name: Slack - Setting Success Condition - when: on_success - - run: - command: | - if [ ! -x /bin/bash ]; then - echo Bash not installed. - exit 1 - fi - name: Provide error if non-bash shell - - run: - command: | - current_branch_in_filter=false - - IFS="," read -ra BRANCH_FILTERS <<< "master" - - for i in "${BRANCH_FILTERS[@]}"; do - if [ "${i}" == "${CIRCLE_BRANCH}" ]; then - current_branch_in_filter=true - fi - done - - if [ "x" == "xmaster" ] || [ "$current_branch_in_filter" = true ]; then - # Provide error if no webhook is set and error. Otherwise continue - if [ -z "webhook" ]; then - echo "NO SLACK WEBHOOK SET" - echo "Please input your SLACK_WEBHOOK value either in the settings for this project, or as a parameter for this orb." - exit 1 - else - #Create Members string - if [ -n "" ]; then - IFS="," read -ra SLACK_MEMBERS <<< "" - for i in "${SLACK_MEMBERS[@]}"; do - if [ $(echo ${i} | head -c 1) == "S" ]; then - SLACK_MENTIONS="${SLACK_MENTIONS} " - elif echo ${i} | grep -E "^(here|channel|everyone)$" > /dev/null; then - SLACK_MENTIONS="${SLACK_MENTIONS} " - else - SLACK_MENTIONS="${SLACK_MENTIONS}<@${i}> " - fi - done - fi - #If successful - if [ "$SLACK_BUILD_STATUS" = "success" ]; then - #Skip if fail_only - if [ true = true ]; then - echo "The job completed successfully" - echo '"fail_only" is set to "true". No Slack notification sent.' - else - curl -X POST -H 'Content-type: application/json' \ - --data "{ \ - \"attachments\": [ \ - { \ - \"fallback\": \":tada: A $CIRCLE_JOB job has succeeded!\", \ - \"text\": \":tada: A $CIRCLE_JOB job has succeeded! $SLACK_MENTIONS\", \ - \"fields\": [ \ - { \ - \"title\": \"Project\", \ - \"value\": \"$CIRCLE_PROJECT_REPONAME\", \ - \"short\": true \ - }, \ - { \ - \"title\": \"Job Number\", \ - \"value\": \"$CIRCLE_BUILD_NUM\", \ - \"short\": true \ - } \ - ], \ - \"actions\": [ \ - { \ - \"type\": \"button\", \ - \"text\": \"Visit Job\", \ - \"url\": \"$CIRCLE_BUILD_URL\" \ - } \ - ], \ - \"color\": \"#1CBF43\" \ - } \ - ] \ - } " webhook - echo "Job completed successfully. Alert sent." - fi - else - #If Failed - curl -X POST -H 'Content-type: application/json' \ - --data "{ \ - \"attachments\": [ \ - { \ - \"fallback\": \":red_circle: A $CIRCLE_JOB job has failed!\", \ - \"text\": \":red_circle: A $CIRCLE_JOB job has failed! $SLACK_MENTIONS\", \ - \"fields\": [ \ - { \ - \"title\": \"Project\", \ - \"value\": \"$CIRCLE_PROJECT_REPONAME\", \ - \"short\": true \ - }, \ - { \ - \"title\": \"Job Number\", \ - \"value\": \"$CIRCLE_BUILD_NUM\", \ - \"short\": true \ - } \ - ], \ - \"actions\": [ \ - { \ - \"type\": \"button\", \ - \"text\": \"Visit Job\", \ - \"url\": \"$CIRCLE_BUILD_URL\" \ - } \ - ], \ - \"color\": \"#ed5c5c\" \ - } \ - ] \ - } " webhook - echo "Job failed. Alert sent." - fi - fi - else - echo "Current branch is not included in only_for_branches filter; no status alert will be sent" - fi - name: Slack - Sending Status Alert - shell: /bin/bash - when: always test-sql-latest: machine: image: ubuntu-2004:202111-01 @@ -376,10 +249,6 @@ workflows: # make -C testing/dbtest/docker clean # name: Cleanup # when: always -# - slack/status: -# fail_only: true -# only_for_branches: master -# webhook: webhook # make-gen-deltas: # executor: go-machine-medium # steps: diff --git a/.circleci/config/jobs/build.yml b/.circleci/config/jobs/build.yml index 331c9440c4..fa4afd8c69 100644 --- a/.circleci/config/jobs/build.yml +++ b/.circleci/config/jobs/build.yml @@ -19,7 +19,3 @@ steps: when: always command: | make -C testing/dbtest/docker clean -- slack/status: - fail_only: true - only_for_branches: master - webhook: webhook