-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1290 from stackhpc/yoga-ci-slack-alerts
CI: Add Slack alert to automatically triggered workflows
- Loading branch information
Showing
3 changed files
with
65 additions
and
0 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 |
---|---|---|
|
@@ -98,3 +98,25 @@ jobs: | |
push: true | ||
tags: ${{ steps.meta.outputs.tags }} | ||
labels: ${{ steps.meta.outputs.labels }} | ||
|
||
- name: Send message to Slack via Workflow Builder | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"channel-id": "${{ env.SLACK_CHANNEL_ID }}", | ||
"inputs": "${{ env.INPUTS }}", | ||
"message": "${{ env.MESSAGE }}", | ||
"results-url": "${{ env.RESULTS_URL }}", | ||
"workflow-url": "${{ env.WORKFLOW_URL }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
# #release-train-alerts | ||
SLACK_CHANNEL_ID: C03B28HRP53 | ||
INPUTS: >- | ||
branch: ${{ github.ref_name }} | ||
MESSAGE: "SKC Build Kayobe Image workflow failed :sob:" | ||
RESULTS_URL: "N/A" | ||
WORKFLOW_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
if: failure() && github.event_name == 'push' |
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 |
---|---|---|
|
@@ -75,3 +75,24 @@ jobs: | |
OS_CLOUD: openstack | ||
OS_APPLICATION_CREDENTIAL_ID: ${{ secrets.OS_APPLICATION_CREDENTIAL_ID }} | ||
OS_APPLICATION_CREDENTIAL_SECRET: ${{ secrets.OS_APPLICATION_CREDENTIAL_SECRET }} | ||
|
||
- name: Send message to Slack via Workflow Builder | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"channel-id": "${{ env.SLACK_CHANNEL_ID }}", | ||
"inputs": "${{ env.INPUTS }}", | ||
"message": "${{ env.MESSAGE }}", | ||
"results-url": "${{ env.RESULTS_URL }}", | ||
"workflow-url": "${{ env.WORKFLOW_URL }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
# #release-train-alerts | ||
SLACK_CHANNEL_ID: C03B28HRP53 | ||
INPUTS: "N/A" | ||
MESSAGE: "SKC CI Cleanup workflow failed :sob:" | ||
RESULTS_URL: "N/A" | ||
WORKFLOW_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
if: failure() |
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 |
---|---|---|
|
@@ -27,3 +27,25 @@ jobs: | |
- name: Display link to package repository promotion workflows | ||
run: | | ||
echo "::notice Package repository promote workflow: https://github.com/stackhpc/stackhpc-release-train/actions/workflows/package-promote.yml" | ||
- name: Send message to Slack via Workflow Builder | ||
uses: slackapi/[email protected] | ||
with: | ||
payload: | | ||
{ | ||
"channel-id": "${{ env.SLACK_CHANNEL_ID }}", | ||
"inputs": "${{ env.INPUTS }}", | ||
"message": "${{ env.MESSAGE }}", | ||
"results-url": "${{ env.RESULTS_URL }}", | ||
"workflow-url": "${{ env.WORKFLOW_URL }}" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
# #release-train-alerts | ||
SLACK_CHANNEL_ID: C03B28HRP53 | ||
INPUTS: >- | ||
branch: ${{ github.ref_name }} | ||
MESSAGE: "SKC promote workflow failed :sob:" | ||
RESULTS_URL: "N/A" | ||
WORKFLOW_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
if: failure() |