mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 10:23:27 +00:00
ci: add Teams notification with report link
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was canceled
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# Woodpecker CI pipeline for Helix Engage
|
# Woodpecker CI pipeline for Helix Engage
|
||||||
#
|
#
|
||||||
# Reports published to operations.healix360.net/reports/{pipeline-number}/
|
# Reports published to operations.healix360.net/reports/{pipeline-number}/
|
||||||
|
# Teams notification sent on completion.
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: [push, manual]
|
- event: [push, manual]
|
||||||
@@ -39,3 +40,42 @@ steps:
|
|||||||
from_secret: s3_secret_key
|
from_secret: s3_secret_key
|
||||||
when:
|
when:
|
||||||
- status: [success, failure]
|
- status: [success, failure]
|
||||||
|
|
||||||
|
notify-teams:
|
||||||
|
image: curlimages/curl
|
||||||
|
commands:
|
||||||
|
- |
|
||||||
|
if [ "${CI_PIPELINE_STATUS}" = "success" ]; then
|
||||||
|
ICON="✅"
|
||||||
|
COLOR="Good"
|
||||||
|
else
|
||||||
|
ICON="❌"
|
||||||
|
COLOR="Attention"
|
||||||
|
fi
|
||||||
|
curl -s -X POST "${TEAMS_WEBHOOK}" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
-d "{
|
||||||
|
\"type\": \"message\",
|
||||||
|
\"attachments\": [{
|
||||||
|
\"contentType\": \"application/vnd.microsoft.card.adaptive\",
|
||||||
|
\"content\": {
|
||||||
|
\"type\": \"AdaptiveCard\",
|
||||||
|
\"version\": \"1.4\",
|
||||||
|
\"body\": [
|
||||||
|
{\"type\": \"TextBlock\", \"size\": \"Medium\", \"weight\": \"Bolder\", \"text\": \"${ICON} Helix Engage — Pipeline #${CI_PIPELINE_NUMBER}\"},
|
||||||
|
{\"type\": \"TextBlock\", \"text\": \"**Branch:** ${CI_COMMIT_BRANCH}\", \"wrap\": true},
|
||||||
|
{\"type\": \"TextBlock\", \"text\": \"**Status:** ${CI_PIPELINE_STATUS}\", \"wrap\": true},
|
||||||
|
{\"type\": \"TextBlock\", \"text\": \"**Commit:** ${CI_COMMIT_MESSAGE}\", \"wrap\": true}
|
||||||
|
],
|
||||||
|
\"actions\": [
|
||||||
|
{\"type\": \"Action.OpenUrl\", \"title\": \"View Report\", \"url\": \"https://operations.healix360.net/reports/${CI_PIPELINE_NUMBER}/index.html\"},
|
||||||
|
{\"type\": \"Action.OpenUrl\", \"title\": \"View Pipeline\", \"url\": \"https://operations.healix360.net/repos/1/pipeline/${CI_PIPELINE_NUMBER}\"}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}"
|
||||||
|
environment:
|
||||||
|
TEAMS_WEBHOOK:
|
||||||
|
from_secret: teams_webhook
|
||||||
|
when:
|
||||||
|
- status: [success, failure]
|
||||||
|
|||||||
Reference in New Issue
Block a user