generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Adding Notifications as seperate event listener. (#958)
- Loading branch information
Showing
2 changed files
with
39 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,21 +63,6 @@ jobs: | |
target: ${{ needs.vars.outputs.pr }} | ||
tags: test #Promote images AFTER successful deploy | ||
|
||
notify-teams-test: | ||
name: Notify Teams - Test | ||
needs: [deploys-test, vars] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: MS Teams Notifications | ||
uses: dchourasia/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
webhook-uri: ${{ vars.MS_TEAMS_WEBHOOK_URI }} | ||
custom-facts: | | ||
- name: Notify QA Team | ||
value: "Successful Deploy of ${{ needs.vars.outputs.pr }} to TEST - cc QA TEAM" | ||
show-on-exit: false | ||
|
||
deploys-prod: | ||
name: Deploys (prod) | ||
needs: [promote-images-test, vars] | ||
|
@@ -90,21 +75,6 @@ jobs: | |
vault_role: prod | ||
vault_zone: prod | ||
|
||
notify-teams-prod: | ||
name: Notify Teams - Prod | ||
needs: [deploys-prod, vars] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: MS Teams Notifications | ||
uses: dchourasia/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
webhook-uri: ${{ vars.MS_TEAMS_WEBHOOK_URI }} | ||
custom-facts: | | ||
- name: Notify Production Team | ||
value: "Successful Deploy of ${{ needs.vars.outputs.pr }} to PROD" | ||
show-on-exit: false | ||
|
||
promote-images-prod: | ||
name: Promote Images - Prod | ||
needs: [deploys-prod, vars] | ||
|
@@ -197,15 +167,6 @@ jobs: | |
release_name: Release ${{ needs.GitVersion.outputs.fullSemVer }} | ||
draft: false | ||
prerelease: false | ||
- name: MS Teams Notifications | ||
uses: dchourasia/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
webhook-uri: ${{ vars.MS_TEAMS_WEBHOOK_URI }} | ||
custom-facts: | | ||
- name: Notify Teams | ||
value: "Release ${{ needs.GitVersion.outputs.fullSemVer }} Created." | ||
show-on-exit: false | ||
|
||
promote-images-release: | ||
name: Tag images with Release Version | ||
|
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,39 @@ | ||
name: Notifications | ||
on: | ||
pull_request: | ||
types: [opened,reopened,synchronize,closed] | ||
push: | ||
branches: [main] | ||
paths-ignore: | ||
- '*.md' | ||
- '.github/**' | ||
- 'common/graphics/**' | ||
- '!.github/workflows/deploy.yml' | ||
- '!.github/workflows/merge.yml' | ||
jobs: | ||
vars: | ||
name: Set Variables | ||
outputs: | ||
pr: ${{ steps.pr.outputs.pr }} | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 1 | ||
steps: | ||
# Get PR number for squash merges to main | ||
- name: PR Number | ||
id: pr | ||
uses: bcgov-nr/[email protected] | ||
|
||
notify-teams: | ||
name: Notify Teams | ||
needs: [vars] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: MS Teams Notifications | ||
uses: dchourasia/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
webhook-uri: ${{ vars.MS_TEAMS_WEBHOOK_URI }} | ||
custom-facts: | | ||
- name: PR# | ||
value: "${{ needs.vars.outputs.pr }}" | ||
show-on-exit: false |