Remove slack notifications from pipelines

This commit is contained in:
Roy Clarkson
2025-02-05 10:58:15 -05:00
parent 03f681c71d
commit f22d0760f4
4 changed files with 1 additions and 79 deletions

View File

@@ -1,5 +1,3 @@
artifactory-server: https://repo.spring.io
build-name: spring-cloud-app-broker
ab-slack-success-channel: "#sc-app-broker"
ab-slack-failure-channel: "#sc-app-broker"
github-repo: https://github.com/spring-cloud/spring-cloud-app-broker

View File

@@ -1,20 +1,4 @@
---
aliases:
- &slack-success-notification
put: alert
params:
icon_emoji: ":concourse:"
username: concourse
channel: ((ab-slack-success-channel))
text: "`$BUILD_PIPELINE_NAME ((branch))` pipeline has succeeded with build <${ATC_EXTERNAL_URL}/builds/$BUILD_ID|$BUILD_NAME>!"
- &slack-failure-notification
put: alert
params:
icon_emoji: ":animal-1252:"
username: concourse
channel: ((ab-slack-failure-channel))
text: "<!here> Build <${ATC_EXTERNAL_URL}/builds/$BUILD_ID|$BUILD_NAME> of job `$BUILD_JOB_NAME` in the `$BUILD_PIPELINE_NAME ((branch))` pipeline has failed!"
jobs:
- name: build-ci-images
plan:
@@ -42,7 +26,6 @@ jobs:
params:
image: image/image.tar
no_get: true
on_failure: *slack-failure-notification
- name: build
serial: true
@@ -77,10 +60,6 @@ jobs:
- /**/*-docs.zip
properties:
zip.type: docs
on_failure:
*slack-failure-notification
on_error:
*slack-failure-notification
- name: run-acceptance-tests
serial: true
@@ -104,17 +83,11 @@ jobs:
ci-image-tag: ((ci-image-tag))
on_success:
in_parallel:
- *slack-success-notification
- put: cf-environment
params:
action: release
resource: cf-environment
on_failure:
*slack-failure-notification
on_error:
*slack-failure-notification
- name: stage-milestone
serial: true
plan:
@@ -231,14 +204,6 @@ resource_types:
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: 0.0.14
- name: slack-notification
type: registry-image
source:
repository: ((app-broker-virtual-docker-registry))/cfcommunity/slack-notification-resource
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: latest
- name: shepherd
type: registry-image
source:
@@ -317,11 +282,6 @@ resources:
password: ((artifactory-password))
build_name: ((build-name))
- name: alert
type: slack-notification
source:
url: ((scs-slack-webhook))
- name: cf-environment
type: shepherd
source:

View File

@@ -1,21 +1,4 @@
---
aliases:
- &slack-success-notification
put: alert
params:
icon_emoji: ":concourse:"
username: concourse
channel: ((ab-slack-success-channel))
text: "`$BUILD_PIPELINE_NAME` pipeline has succeeded with build <${ATC_EXTERNAL_URL}/builds/$BUILD_ID|$BUILD_NAME>!"
- &slack-failure-notification
put: alert
params:
icon_emoji: ":animal-1252:"
username: concourse
channel: ((ab-slack-failure-channel))
text: "<!here> Build <${ATC_EXTERNAL_URL}/builds/$BUILD_ID|$BUILD_NAME> of job `$BUILD_JOB_NAME` in the `$BUILD_PIPELINE_NAME` pipeline has failed!"
jobs:
- name: build
plan:
@@ -51,13 +34,10 @@ jobs:
git-repo: pull-request
on_success:
in_parallel:
- *slack-success-notification
- put: cf-environment
params:
action: release
resource: cf-environment
on_failure: *slack-failure-notification
on_error: *slack-failure-notification
resource_types:
- name: pull-request
@@ -68,14 +48,6 @@ resource_types:
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: latest
- name: slack-notification
type: registry-image
source:
repository: ((app-broker-virtual-docker-registry))/cfcommunity/slack-notification-resource
username: ((broadcom-jfrog-artifactory-robot-account.username))
password: ((broadcom-jfrog-artifactory-robot-account.password))
tag: latest
- name: shepherd
type: registry-image
source:
@@ -95,11 +67,6 @@ resources:
disable_forks: true
required_review_approvals: 1
- name: alert
type: slack-notification
source:
url: ((scs-slack-webhook))
- name: cf-environment
type: shepherd
source:

View File

@@ -6,8 +6,6 @@ readonly FLY_TARGET="${FLY_TARGET:-"app-broker"}"
readonly PIPELINE_NAME_SUFFIX="${PIPELINE_NAME_SUFFIX:-""}"
readonly PIPELINE_TYPE=${1:-""}
[[ "$PIPELINE_NAME_SUFFIX" ]] && DISABLE_SLACK_ALERTING="true" || DISABLE_SLACK_ALERTING="false"
set_branch_pipeline() {
local -r pipeline_name="app-broker${PIPELINE_NAME_SUFFIX:+"-$PIPELINE_NAME_SUFFIX"}"
local -r branches=("2.4.x" "2.3.x" "2.2.x" "2.1.x" "2.0.x" "1.6.x")
@@ -20,8 +18,7 @@ set_branch_pipeline() {
--config pipeline.yml \
--load-vars-from config-concourse.yml \
--instance-var "branch=$branch" \
--var "ci-image-tag=$branch" \
--var "disable-slack-alerting=$DISABLE_SLACK_ALERTING" \`
--var "ci-image-tag=$branch" \`
done
}