Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Simplify CI notifications from task hooks #454

Merged
merged 2 commits into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
98 changes: 35 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 Expand Up @@ -301,6 +264,15 @@ resources:

resource_types:

- name: git
type: registry-image
source:
aws_access_key_id: ((ecr_aws_key))
aws_secret_access_key: ((ecr_aws_secret))
repository: git-resource
aws_region: us-gov-west-1
tag: latest

- name: slack-notification
type: registry-image
source:
Expand Down
Loading