From 44f1ec36e1c2ce1d3bf25abbce76eb96b3f9a593 Mon Sep 17 00:00:00 2001 From: saridsa2 Date: Sat, 11 Apr 2026 15:29:49 +0530 Subject: [PATCH] =?UTF-8?q?ci:=20add=20Woodpecker=20pipeline=20=E2=80=94?= =?UTF-8?q?=20unit=20tests=20+=20Teams=20notification?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .woodpecker.yml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .woodpecker.yml diff --git a/.woodpecker.yml b/.woodpecker.yml new file mode 100644 index 0000000..cc474e3 --- /dev/null +++ b/.woodpecker.yml @@ -0,0 +1,49 @@ +# Woodpecker CI pipeline for Helix Engage Server (sidecar) +# +# Runs unit tests. Teams notification on completion. + +when: + - event: [push, manual] + +steps: + unit-tests: + image: node:20 + commands: + - npm ci + - npm test -- --ci --forceExit + + notify-teams: + image: curlimages/curl + commands: + - | + if [ "${CI_PIPELINE_STATUS}" = "success" ]; then + ICON="✅" + else + ICON="❌" + 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 Server — 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 Pipeline\", \"url\": \"https://operations.healix360.net/repos/2/pipeline/${CI_PIPELINE_NUMBER}\"} + ] + } + }] + }" + environment: + TEAMS_WEBHOOK: + from_secret: teams_webhook + when: + - status: [success, failure]