From 69afa05dd29f9cb042cda16a84328cbe7d73b700 Mon Sep 17 00:00:00 2001 From: Hexeong <123macanic@naver.com> Date: Mon, 15 Jun 2026 20:47:01 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20=EC=95=A1=EC=B6=94=EC=97=90?= =?UTF-8?q?=EC=9D=B4=ED=84=B0=20=ED=8F=AC=ED=8A=B8=20=EA=B2=80=EC=82=AC=20?= =?UTF-8?q?=EB=B0=A9=EC=8B=9D=20=EB=B3=80=EA=B2=BD(status:UP=20->=20http?= =?UTF-8?q?=5Fstatus=5Fcode)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev-cd.yml | 5 +++-- .github/workflows/prod-cd.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev-cd.yml b/.github/workflows/dev-cd.yml index 60ef98b42..745fc4d93 100644 --- a/.github/workflows/dev-cd.yml +++ b/.github/workflows/dev-cd.yml @@ -153,10 +153,11 @@ jobs: docker compose -p "${CONTAINER_BASE}-${NEW_SLOT}" -f docker-compose.dev.yml up -d solid-connection-dev # 8. 헬스 체크 (앱 기동 대기, 최대 150초) + # HTTP 200 = UP, 503 = DOWN (single-quote 내부 quoting 문제 없이 상태코드로 판단) echo "Waiting for app on management port ${MANAGEMENT_PORT}..." for i in $(seq 1 30); do - STATUS=$(curl -s --connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" | grep -o '"status":"UP"' || true) - [ "$STATUS" = '"status":"UP"' ] && { echo "App healthy (attempt ${i})"; break; } + HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" || true) + [ "$HTTP_CODE" = "200" ] && { echo "App healthy (attempt ${i})"; break; } [ "$i" = "30" ] && { echo "Health check timed out after 150s" >&2 docker stop "${CONTAINER_BASE}-${NEW_SLOT}" 2>/dev/null || true diff --git a/.github/workflows/prod-cd.yml b/.github/workflows/prod-cd.yml index 606f976a5..919491ac7 100644 --- a/.github/workflows/prod-cd.yml +++ b/.github/workflows/prod-cd.yml @@ -164,10 +164,11 @@ jobs: docker compose -p "${CONTAINER_BASE}-${NEW_SLOT}" -f docker-compose.prod.yml up -d solid-connection-server # 6. 헬스 체크 (앱 기동 대기, 최대 150초) + # HTTP 200 = UP, 503 = DOWN (single-quote 내부 quoting 문제 없이 상태코드로 판단) echo "Waiting for app on management port ${MANAGEMENT_PORT}..." for i in $(seq 1 30); do - STATUS=$(curl -s --connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" | grep -o '"status":"UP"' || true) - [ "$STATUS" = '"status":"UP"' ] && { echo "App healthy (attempt ${i})"; break; } + HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 2 "http://localhost:${MANAGEMENT_PORT}/actuator/health" || true) + [ "$HTTP_CODE" = "200" ] && { echo "App healthy (attempt ${i})"; break; } [ "$i" = "30" ] && { echo "Health check timed out after 150s" >&2 docker stop "${CONTAINER_BASE}-${NEW_SLOT}" 2>/dev/null || true