From aad6cb75d08654aa42c074845d10422bdddd60d6 Mon Sep 17 00:00:00 2001 From: Jason Woltje Date: Sun, 8 Feb 2026 14:46:48 -0600 Subject: [PATCH] fix(ci): Handle 201 status code for package linking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Gitea package link API returns 201 (Created) on successful linking, not 204 (No Content) as we were checking for. Updated the link-packages step to accept both 201 and 204 as success. Also added visual indicators (✅/❌) to make link status clearer in logs. Diagnostic output showed all 5 packages successfully linked with 201: - stack-api: 201 (linked) - stack-web: 201 (linked) - stack-postgres: 201 (linked) - stack-openbao: 201 (linked) - stack-orchestrator: 201 (linked) Subsequent runs return 400 "invalid argument" which means already linked. Co-Authored-By: Claude Opus 4.6 --- .woodpecker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 2835e5e..70ba416 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -282,12 +282,12 @@ steps: STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST \ -H "Authorization: token $GITEA_TOKEN" \ "https://git.mosaicstack.dev/api/v1/packages/mosaic/container/${package}/-/link/stack") - if [ "$STATUS" = "204" ]; then - echo "Linked ${package} to stack" + if [ "$STATUS" = "201" ] || [ "$STATUS" = "204" ]; then + echo "✅ Linked ${package} to stack" elif [ "$STATUS" = "400" ]; then - echo "${package} already linked (OK)" + echo "✅ ${package} already linked (OK)" else - echo "Warning: ${package} link returned $STATUS" + echo "❌ Warning: ${package} link returned $STATUS" fi done when: