Skip to content

Commit

Permalink
chore: Simplify CI notifications from task hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
apburnes committed Feb 16, 2024
1 parent 8ed1ff1 commit 0590903
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 89 deletions.
34 changes: 8 additions & 26 deletions ci/pipeline-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,14 @@ jobs:
CF_DOCKER_PASSWORD: ((ecr-aws-secret))

on_failure:
in_parallel:
- put: slack
params:
text: |
:x: FAILED: pages build container deployment on ((deploy-env))
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details>
channel: ((slack-channel))
username: ((slack-username))
icon_url: ((slack-icon-url))
put: slack
params:
text: |
:x: FAILED: pages build container deployment on ((deploy-env))
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details>
channel: ((slack-channel))
username: ((slack-username))
icon_url: ((slack-icon-url))

- name: nightly-((deploy-env))
plan:
Expand Down Expand Up @@ -193,23 +192,6 @@ jobs:
username: ((slack-username))
icon_url: ((slack-icon-url))

- name: report-success-((deploy-env))
plan:
- get: src
resource: pr-((git-branch))
trigger: true
passed: [deploy-((deploy-env))]
on_success:
in_parallel:
- put: slack
params:
text: |
:white_check_mark: SUCCESS: Successfully deployed pages build containers on ((deploy-env))
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details>
channel: ((slack-channel))
username: ((slack-username))
icon_url: ((slack-icon-url))

############################
# RESOURCES

Expand Down
89 changes: 26 additions & 63 deletions ci/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,35 +100,17 @@ jobs:
resource: src-((deploy-env))
trigger: true
params: {depth: 1}
- put: pr-((git-branch))
params:
path: pull-request
status: pending
context: concourse
- do: *test

on_success:
put: pr-((git-branch))
params:
path: pull-request
status: success
context: concourse

on_failure:
in_parallel:
- put: pr-((git-branch))
params:
path: pull-request
status: failure
context: concourse
- put: slack
params:
text: |
:x: FAILED: pages build container tests on ((deploy-env))
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details>
channel: ((slack-channel))
username: ((slack-username))
icon_url: ((slack-icon-url))
put: slack
params:
text: |
:x: FAILED: pages build container tests on ((deploy-env))
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details>
channel: ((slack-channel))
username: ((slack-username))
icon_url: ((slack-icon-url))

- name: deploy-((deploy-env))
plan:
Expand Down Expand Up @@ -176,21 +158,25 @@ jobs:
CF_DOCKER_USERNAME: ((ecr-aws-key))
CF_DOCKER_PASSWORD: ((ecr-aws-secret))

on_success:
put: slack
params:
text: |
:white_check_mark: SUCCESS: Successfully deployed pages build containers on ((deploy-env))
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details>
channel: ((slack-channel))
username: ((slack-username))
icon_url: ((slack-icon-url))

on_failure:
in_parallel:
- put: pr-((git-branch))
params:
path: pull-request
status: failure
context: concourse
- put: slack
params:
text: |
:x: FAILED: pages build container deployment on ((deploy-env))
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details>
channel: ((slack-channel))
username: ((slack-username))
icon_url: ((slack-icon-url))
put: slack
params:
text: |
:x: FAILED: pages build container deployment on ((deploy-env))
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details>
channel: ((slack-channel))
username: ((slack-username))
icon_url: ((slack-icon-url))

- name: nightly-((deploy-env))
plan:
Expand Down Expand Up @@ -229,29 +215,6 @@ jobs:
username: ((slack-username))
icon_url: ((slack-icon-url))

- name: report-success-((deploy-env))
plan:
- get: src
resource: src-((deploy-env))
trigger: true
params: {depth: 1}
passed: [deploy-((deploy-env))]
on_success:
in_parallel:
- put: pr-((git-branch))
params:
path: pull-request
status: success
context: concourse
- put: slack
params:
text: |
:white_check_mark: SUCCESS: Successfully deployed pages build containers on ((deploy-env))
<$ATC_EXTERNAL_URL/teams/$BUILD_TEAM_NAME/pipelines/$BUILD_PIPELINE_NAME/jobs/$BUILD_JOB_NAME/builds/$BUILD_NAME|View build details>
channel: ((slack-channel))
username: ((slack-username))
icon_url: ((slack-icon-url))

############################
# RESOURCES

Expand Down

0 comments on commit 0590903

Please sign in to comment.