From 2ddd409ef421beabffc900a0dafc9b50ac556464 Mon Sep 17 00:00:00 2001 From: mifi Date: Sun, 1 Feb 2026 23:16:02 -0300 Subject: [PATCH] Perhaps... --- .woodpecker/production.yaml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.woodpecker/production.yaml b/.woodpecker/production.yaml index 84c2273..e7336e0 100644 --- a/.woodpecker/production.yaml +++ b/.woodpecker/production.yaml @@ -3,6 +3,11 @@ # Secrets required: portainer_webhook_url (Portainer stack webhook URL), discord_webhook_url (Discord incoming webhook). skip_clone: true +# Use /tmp so rootless step containers (e.g. curlimages/curl) can create the workspace. +workspace: + base: /tmp + path: woodpecker + when: event: deployment evaluate: 'CI_PIPELINE_DEPLOY_TARGET == "production"' @@ -16,16 +21,30 @@ steps: commands: - curl -sS -X POST "$PORTAINER_WEBHOOK_URL" - - name: Send Production Deploy Status + - name: Send Deploy Status Notification (success) image: curlimages/curl environment: DISCORD_WEBHOOK_URL: from_secret: discord_webhook_url commands: - | - EMOJI="💩" - [ "$CI_PIPELINE_STATUS" = "success" ] && EMOJI="🎉" - BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Production Deploy %s %s"}' "$CI_REPO" "$CI_PIPELINE_NUMBER" "$CI_PIPELINE_STATUS" "$EMOJI") + BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Production Deploy success 🎉"}' "$CI_REPO" "$CI_PIPELINE_NUMBER") curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL" + depends_on: + - Deploy to Production when: - - status: [ success, failure ] + - status: [ success ] + + - name: Send Deploy Status Notification (failure) + image: curlimages/curl + environment: + DISCORD_WEBHOOK_URL: + from_secret: discord_webhook_url + commands: + - | + BODY=$(printf '{"username":"WoodpeckerBot","content":"[%s - Build #%s] Production Deploy failure 💩"}' "$CI_REPO" "$CI_PIPELINE_NUMBER") + curl -sS -X POST -H "Content-Type: application/json" -d "$BODY" "$DISCORD_WEBHOOK_URL" + depends_on: + - Deploy to Production + when: + - status: [ failure ]