mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage
synced 2026-04-11 18:28:15 +00:00
ci: fix Teams notification — use Adaptive Card with curl
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
# Woodpecker CI pipeline for Helix Engage
|
# Woodpecker CI pipeline for Helix Engage
|
||||||
#
|
#
|
||||||
# Reports at operations.healix360.net/reports/{pipeline-number}/
|
# Reports at operations.healix360.net/reports/{pipeline-number}/
|
||||||
# Teams notification on completion.
|
|
||||||
|
|
||||||
when:
|
when:
|
||||||
- event: [push, manual]
|
- event: [push, manual]
|
||||||
@@ -42,13 +41,14 @@ steps:
|
|||||||
- status: [success, failure]
|
- status: [success, failure]
|
||||||
|
|
||||||
notify-teams:
|
notify-teams:
|
||||||
image: mobydeck/ci-teams-notification
|
image: curlimages/curl
|
||||||
settings:
|
|
||||||
webhook_url:
|
|
||||||
from_secret: teams_webhook
|
|
||||||
facts: project,message
|
|
||||||
buttons: pipeline
|
|
||||||
environment:
|
environment:
|
||||||
REPORT_URL: https://operations.healix360.net/reports/${CI_PIPELINE_NUMBER}/index.html
|
TEAMS_WEBHOOK:
|
||||||
|
from_secret: teams_webhook
|
||||||
|
commands:
|
||||||
|
- >
|
||||||
|
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":"Helix Engage — Build #'"$CI_PIPELINE_NUMBER"'"},{"type":"TextBlock","text":"Branch: '"$CI_COMMIT_BRANCH"'","wrap":true},{"type":"TextBlock","text":"40 E2E tests completed","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"'"}]}}]}'
|
||||||
when:
|
when:
|
||||||
- status: [success, failure]
|
- status: [success, failure]
|
||||||
|
|||||||
Reference in New Issue
Block a user