From 4f870a5c165b458bc1ff641c0434c76c681da7dd Mon Sep 17 00:00:00 2001 From: amaliadwiy Date: Thu, 23 Apr 2026 14:28:26 +0800 Subject: [PATCH] fix: treat 524/504 timeout as accepted on repull --- .github/workflows/script/re-pull.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/script/re-pull.sh b/.github/workflows/script/re-pull.sh index 8097813..7c19ae3 100644 --- a/.github/workflows/script/re-pull.sh +++ b/.github/workflows/script/re-pull.sh @@ -48,9 +48,11 @@ HTTP_STATUS=$(curl -s -o /tmp/portainer_response.json -w "%{http_code}" \ -H "Content-Type: application/json" \ -d "$PAYLOAD") -if [ "$HTTP_STATUS" != "200" ]; then +if [ "$HTTP_STATUS" = "524" ] || [ "$HTTP_STATUS" = "504" ] || [ "$HTTP_STATUS" = "408" ]; then + echo "⚠️ HTTP $HTTP_STATUS (gateway timeout) — Portainer tetap memproses redeploy, lanjut polling container..." +elif [ "$HTTP_STATUS" != "200" ]; then echo "❌ Redeploy gagal! HTTP Status: $HTTP_STATUS" - cat /tmp/portainer_response.json | jq . + cat /tmp/portainer_response.json | jq . 2>/dev/null || true exit 1 fi