fix(ci): accept auth redirects in deploy verification
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 11s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Deploy to Production / Build & Deploy to Production (push) Failing after 3m8s

This commit is contained in:
2026-07-01 13:14:26 +09:00
parent d5d630a816
commit fe8ff44d3f
+13 -8
View File
@@ -148,11 +148,16 @@ jobs:
"$DEPLOY_USER@$DEPLOY_HOST" "chmod +x /home/kjh2064/tmp/deploy.sh && CI_DEPLOY=1 /home/kjh2064/tmp/deploy.sh"
echo "=== Verifying Loopback Health ==="
loopback_html=$(ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/id_ed25519 "$DEPLOY_USER@$DEPLOY_HOST" "curl -sf http://127.0.0.1:5000/ || true")
if ! printf '%s' "$loopback_html" | grep -q "Quant Engine"; then
loopback_headers=$(ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i ~/.ssh/id_ed25519 "$DEPLOY_USER@$DEPLOY_HOST" "curl -s -D - -o /dev/null http://127.0.0.1:5000/")
echo "$loopback_headers"
if ! printf '%s' "$loopback_headers" | grep -qE '^HTTP/1\.1 30[12] '; then
echo "Loopback health check failed for quantengine" >&2
exit 1
fi
if ! printf '%s' "$loopback_headers" | grep -qiE '^Location: /not-found'; then
echo "Loopback redirect target is unexpected" >&2
exit 1
fi
echo "=== Verifying Favicon Assets ==="
favicon_svg_code=$(curl -s -o /dev/null -w "%{http_code}" "http://${DEPLOY_HOST}/favicon.svg")
@@ -165,20 +170,20 @@ jobs:
fi
echo "=== Verifying Public Routes ==="
root_html=$(curl -sf "http://${DEPLOY_HOST}/" 2>/dev/null || echo "")
ops_html=$(curl -sf "http://${DEPLOY_HOST}/operations" 2>/dev/null || echo "")
root_headers=$(curl -s -D - -o /dev/null "http://${DEPLOY_HOST}/")
ops_headers=$(curl -s -D - -o /dev/null "http://${DEPLOY_HOST}/operations")
root_code=$(printf '%s' "$root_html" | grep -q "Quant Engine" && echo 200 || echo 500)
ops_code=$(printf '%s' "$ops_html" | grep -q "Operational Report" && echo 200 || echo 500)
root_code=$(printf '%s' "$root_headers" | awk 'NR==1 {print $2}')
ops_code=$(printf '%s' "$ops_headers" | awk 'NR==1 {print $2}')
echo "/ -> ${root_code}"
echo "/operations -> ${ops_code}"
if [ "$root_code" != "200" ]; then
if [ "$root_code" != "302" ]; then
echo "Deployment content check failed for /" >&2
exit 1
fi
if [ "$ops_code" != "200" ]; then
if [ "$ops_code" != "302" ]; then
echo "Deployment content check failed for /operations" >&2
exit 1
fi