-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding in slack changes for CARTS (#139600)
- Loading branch information
1 parent
323d9a2
commit 77944c8
Showing
5 changed files
with
90 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Post Deploy | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Deploy] | ||
types: [completed] | ||
branches: | ||
- 'main' | ||
- 'val' | ||
- 'production' | ||
- 'snyk-**' | ||
|
||
jobs: | ||
notify_on_failure: | ||
# Sends alert to macpro-mdct-<product name>-alerts channel in CMS slack when any integration environment fails to deploy or run tests | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' && (github.event.workflow_run.head_branch == 'main' || github.event.workflow_run.head_branch == 'val' || github.event.workflow_run.head_branch == 'production') }} | ||
steps: | ||
- name: Slack Notification | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_TITLE: ":boom: The latest ${{ github.repository }} build on branch '${{ github.event.workflow_run.head_branch }}' has failed" | ||
SLACK_MESSAGE: "${{ github.event.workflow_run.html_url }}" | ||
MSG_MINIMAL: true | ||
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | ||
|
||
# Notify the integrations channel only when a Snyk auto merge fails | ||
notify_failed_snyk_auto_merge: | ||
runs-on: ubuntu-latest | ||
#only check branch names that begin with snyk- | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' && startsWith(github.event.workflow_run.head_branch, 'snyk-') }} | ||
steps: | ||
- name: Debug | ||
run: echo "Ref is ${{ github.ref }}" | ||
- name: Slack Notification | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_TITLE: ":boom: A Synk auto merge has failed in ${{ github.repository }}" | ||
SLACK_MESSAGE: "${{ github.event.workflow_run.html_url }}" | ||
MSG_MINIMAL: true | ||
SLACK_WEBHOOK: ${{ secrets.INTEGRATIONS_SLACK_WEBHOOK }} | ||
|
||
# Sends a slack message to the mdct-prod-releases channel in CMS slack | ||
notify_on_prod_release: | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.workflow_run.conclusion == 'success' && (github.event.workflow_run.head_branch == 'production') }} | ||
steps: | ||
- name: Slack Notification | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_TITLE: ":rocket: ${{ github.repository }} has successfully released to production." | ||
MSG_MINIMAL: true | ||
SLACK_WEBHOOK: ${{ secrets.PROD_RELEASE_SLACK_WEBHOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Pull Request Notification | ||
|
||
on: | ||
pull_request: | ||
types: [opened, reopened, ready_for_review] | ||
|
||
jobs: | ||
notify_integrations_channel: | ||
runs-on: ubuntu-latest | ||
# avoiding notifications for automated Snyk Pull Requests and draft pull requests | ||
if: github.actor != 'mdct-github-service-account' && !github.event.pull_request.draft | ||
steps: | ||
- name: Slack Notification | ||
uses: rtCamp/action-slack-notify@v2 | ||
env: | ||
SLACK_TITLE: ":github: A new pull request has been created in ${{ github.repository }} by ${{ github.event.pull_request.user.login }}" | ||
SLACK_MESSAGE: "${{ github.event.pull_request.html_url }}" | ||
MSG_MINIMAL: true | ||
SLACK_WEBHOOK: ${{ secrets.INTEGRATIONS_SLACK_WEBHOOK }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters