ci(guide): widen cd-develop smoke health-check window to ~5 min
The smoke step polled /guide/actuator/health for only 60s, but the Spring Boot backend restart after `compose up -d` needs longer to warm up — so a successful deploy was marked FAILED (run #6, PR #11). Poll 30x10s (~5 min) and echo attempts. No change to the deploy itself. Closes #12 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -74,12 +74,15 @@ jobs:
|
|||||||
|
|
||||||
- name: Smoke — guide backend healthy + content served
|
- name: Smoke — guide backend healthy + content served
|
||||||
run: |
|
run: |
|
||||||
for i in $(seq 1 12); do
|
# `compose up -d` restarts the Spring Boot backend, which needs well over 60s to warm
|
||||||
|
# up and report healthy — poll for ~5 min so a normal restart isn't a false failure.
|
||||||
|
for i in $(seq 1 30); do
|
||||||
s=$(curl -sk -o /dev/null -w '%{http_code}' https://api.bcos.dev/guide/actuator/health || echo 000)
|
s=$(curl -sk -o /dev/null -w '%{http_code}' https://api.bcos.dev/guide/actuator/health || echo 000)
|
||||||
[ "$s" = "200" ] && { echo "guide healthy"; exit 0; }
|
[ "$s" = "200" ] && { echo "guide healthy (attempt $i)"; exit 0; }
|
||||||
sleep 5
|
echo "attempt $i/30: health=$s — waiting 10s"
|
||||||
|
sleep 10
|
||||||
done
|
done
|
||||||
echo "::error::guide did not report healthy after deploy"; exit 1
|
echo "::error::guide did not report healthy 5 min after deploy"; exit 1
|
||||||
|
|
||||||
# Posts a ✅/🔴 card to #hiveops-dev-deploy on every run (deploy result). Runs even on
|
# Posts a ✅/🔴 card to #hiveops-dev-deploy on every run (deploy result). Runs even on
|
||||||
# failure so a broken build/deploy/smoke is announced, not silent. SLACK_WEBHOOK_URL is an
|
# failure so a broken build/deploy/smoke is announced, not silent. SLACK_WEBHOOK_URL is an
|
||||||
|
|||||||
Reference in New Issue
Block a user