From 22070c16196b493d4befc5f2e5820d77a34fea26 Mon Sep 17 00:00:00 2001 From: kjh2064 Date: Sun, 28 Jun 2026 00:20:47 +0900 Subject: [PATCH] chore: silence curl stderr in browser-e2e to handle transition 502/503 during deploy --- .gitea/workflows/browser-e2e.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/browser-e2e.yml b/.gitea/workflows/browser-e2e.yml index 91a5e35..ce168d6 100644 --- a/.gitea/workflows/browser-e2e.yml +++ b/.gitea/workflows/browser-e2e.yml @@ -41,13 +41,14 @@ jobs: set -e EXPECTED_VERSION="$(git rev-parse --short HEAD)" for i in $(seq 1 60); do - VERSION_BODY="$(curl -fsS "http://${DEPLOY_HOST}/taxbaik/version.txt" || true)" + # Suppress stderr and allow failures to handle transition/down periods cleanly + VERSION_BODY="$(curl -fsS "http://${DEPLOY_HOST}/taxbaik/version.txt" 2>/dev/null || true)" BLOG_STATUS="$(curl -s -o /dev/null -w '%{http_code}' "http://${DEPLOY_HOST}/taxbaik/blog/accountant-mistakes-5" || true)" if echo "$VERSION_BODY" | grep -q "Version: ${EXPECTED_VERSION}" && [ "$BLOG_STATUS" = "200" ]; then echo "Deployment is ready for ${EXPECTED_VERSION}" exit 0 fi - echo "Waiting for deployment ${EXPECTED_VERSION}; blog status=${BLOG_STATUS}; version=${VERSION_BODY}" + echo "Waiting for deployment ${EXPECTED_VERSION} (attempt $i/60); blog status=${BLOG_STATUS:-down}; version=${VERSION_BODY:-unknown}" sleep 10 done echo "Deployment did not publish expected version ${EXPECTED_VERSION} in time" >&2