From 3cd6a6a17dcd7cc6fbb8c1b7d0a38c252936d997 Mon Sep 17 00:00:00 2001 From: Michal Date: Mon, 9 Mar 2026 17:20:34 +0000 Subject: [PATCH] ci: show bootstrap auth error response for debugging The curl -sf flag was hiding the actual HTTP error body. Now we capture and display the full response to diagnose why auth bootstrap fails. Co-Authored-By: Claude Opus 4.6 --- .gitea/workflows/ci.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 294bb86..a7c35e1 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -144,12 +144,18 @@ jobs: - name: Bootstrap auth and write credentials run: | - RESULT=$(curl -sf -X POST http://localhost:3100/api/v1/auth/bootstrap \ + RESULT=$(curl -s -w "\nHTTP_STATUS:%{http_code}" -X POST http://localhost:3100/api/v1/auth/bootstrap \ -H 'Content-Type: application/json' \ -d '{"email":"ci@test.local","password":"ci-smoke-test"}') - echo "Auth bootstrapped" + HTTP_CODE=$(echo "$RESULT" | tail -1 | sed 's/HTTP_STATUS://') + BODY=$(echo "$RESULT" | sed '$d') + echo "Bootstrap response (HTTP $HTTP_CODE): $BODY" + if [ "$HTTP_CODE" -ge 400 ]; then + echo "::error::Bootstrap failed with HTTP $HTTP_CODE" + exit 1 + fi mkdir -p ~/.mcpctl - echo "$RESULT" | node -e " + echo "$BODY" | node -e " const res = JSON.parse(require('fs').readFileSync('/dev/stdin','utf-8')); const creds = {token: res.token, mcpdUrl: 'http://localhost:3100', user: 'ci@test.local'}; require('fs').writeFileSync(require('os').homedir()+'/.mcpctl/credentials', JSON.stringify(creds));