From 199176e729152c7b1d97a4ba096464f3a05f221d Mon Sep 17 00:00:00 2001 From: saridsa2 Date: Sat, 11 Apr 2026 15:34:19 +0530 Subject: [PATCH] ci: use Teams notification plugin --- .woodpecker.yml | 45 +++++++++------------------------------------ 1 file changed, 9 insertions(+), 36 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 22d4636..064589b 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,7 +1,7 @@ # Woodpecker CI pipeline for Helix Engage # -# Reports published to operations.healix360.net/reports/{pipeline-number}/ -# Teams notification sent on completion. +# Reports at operations.healix360.net/reports/{pipeline-number}/ +# Teams notification on completion. when: - event: [push, manual] @@ -42,40 +42,13 @@ steps: - 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: + image: mobydeck/ci-teams-notification + settings: + webhook_url: from_secret: teams_webhook + facts: project,message + buttons: pipeline + environment: + REPORT_URL: https://operations.healix360.net/reports/${CI_PIPELINE_NUMBER}/index.html when: - status: [success, failure]