-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(synthetic-monitoring): simplifying slack messages (#3872)
* chore(synthetic-monitoring): simplifying slack messages * update message formatting
- Loading branch information
1 parent
82ebab7
commit 10596b7
Showing
1 changed file
with
4 additions
and
100 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 |
---|---|---|
|
@@ -32,33 +32,9 @@ jobs: | |
if: ${{ failure() }} | ||
uses: slackapi/[email protected] | ||
with: | ||
# check the block kit builder docs to understand how it works | ||
# and how to modify it: https://api.slack.com/block-kit | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": ":warning: Synthetic Monitoring Alert - Pokeshop Demo", | ||
"emoji": true | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Status:*\nFailed" | ||
}, | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Pipeline:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow>" | ||
} | ||
] | ||
} | ||
] | ||
"text": ":warning: Synthetic Monitoring failed for *Pokeshop Demo*. Pipeline: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow>" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SYNTETIC_MONITORING_SLACK_WEBHOOK_URL }} | ||
|
@@ -88,33 +64,9 @@ jobs: | |
if: ${{ failure() }} | ||
uses: slackapi/[email protected] | ||
with: | ||
# check the block kit builder docs to understand how it works | ||
# and how to modify it: https://api.slack.com/block-kit | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": ":warning: Synthetic Monitoring Alert - Serverless Pokeshop Demo", | ||
"emoji": true | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Status:*\nFailed" | ||
}, | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Pipeline:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow>" | ||
} | ||
] | ||
} | ||
] | ||
"text": ":warning: Synthetic Monitoring failed for *Serverless Pokeshop Demo*. Pipeline: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow>" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SYNTETIC_MONITORING_SLACK_WEBHOOK_URL }} | ||
|
@@ -144,33 +96,9 @@ jobs: | |
if: ${{ failure() }} | ||
uses: slackapi/[email protected] | ||
with: | ||
# check the block kit builder docs to understand how it works | ||
# and how to modify it: https://api.slack.com/block-kit | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": ":warning: Synthetic Monitoring Alert - OTel Demo", | ||
"emoji": true | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Status:*\nFailed" | ||
}, | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Pipeline:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow>" | ||
} | ||
] | ||
} | ||
] | ||
"text": ":warning: Synthetic Monitoring failed for *OTel Demo*. Pipeline: <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow>" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SYNTETIC_MONITORING_SLACK_WEBHOOK_URL }} | ||
|
@@ -186,33 +114,9 @@ jobs: | |
if: ${{ needs.pokeshop-trace-based-tests.result == 'failure' && needs.pokeshop-serverless-trace-based-tests.result == 'failure' && needs.otel-demo-trace-based-tests.result == 'failure' }} | ||
uses: slackapi/[email protected] | ||
with: | ||
# check the block kit builder docs to understand how it works | ||
# and how to modify it: https://api.slack.com/block-kit | ||
payload: | | ||
{ | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": ":red_circle: :loudspeaker: All synthetic monitoring crashed on production! cc: @team-tracetest", | ||
"emoji": true | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"fields": [ | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Status:*\nFailed" | ||
}, | ||
{ | ||
"type": "mrkdwn", | ||
"text": "*Pipeline:*\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow>" | ||
} | ||
] | ||
} | ||
] | ||
"text": ":red_circle: :loudspeaker: *All synthetic monitoring crashed on production!* Pipeline: \n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View workflow>" | ||
} | ||
env: | ||
SLACK_WEBHOOK_URL: ${{ secrets.SYNTETIC_MONITORING_SLACK_WEBHOOK_URL }} | ||
|