fix: extend CI health check timeout from 15s to 90s (6 retries × 15s)
This commit is contained in:
@@ -40,12 +40,12 @@ jobs:
|
|||||||
|
|
||||||
# Wait for production site to be healthy
|
# Wait for production site to be healthy
|
||||||
echo "Waiting for production site to be healthy..."
|
echo "Waiting for production site to be healthy..."
|
||||||
for i in {1..30}; do
|
for i in {1..6}; do
|
||||||
if curl -sf https://euchre.notsosm.art/api/health > /dev/null 2>&1; then
|
if curl -sf https://euchre.notsosm.art/api/health > /dev/null 2>&1; then
|
||||||
echo "✅ Production successfully deployed with version ${VERSION}"
|
echo "✅ Production successfully deployed with version ${VERSION}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
sleep 0.5
|
sleep 15
|
||||||
done
|
done
|
||||||
echo "❌ Production deployment failed"
|
echo "❌ Production deployment failed"
|
||||||
docker compose logs app
|
docker compose logs app
|
||||||
|
|||||||
@@ -83,14 +83,16 @@ jobs:
|
|||||||
|
|
||||||
- name: Wait for CI site to be ready
|
- name: Wait for CI site to be ready
|
||||||
run: |
|
run: |
|
||||||
for i in {1..15}; do
|
for i in {1..6}; do
|
||||||
if docker ps --filter name=euchre-camp-ci --format '{{.Status}}' | grep -q Up; then
|
if curl -sf https://euchre-ci.notsosm.art/api/health > /dev/null 2>&1; then
|
||||||
echo "CI site container is running"
|
echo "CI site is healthy"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 15
|
||||||
done
|
done
|
||||||
echo "CI site container failed to start"
|
echo "CI site failed to become healthy after 90 seconds"
|
||||||
|
docker compose -f /apps/euchre_camp_ci/docker-compose.yml logs app
|
||||||
|
exit 1
|
||||||
docker compose -f /apps/euchre_camp_ci/docker-compose.yml logs app
|
docker compose -f /apps/euchre_camp_ci/docker-compose.yml logs app
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
|
|||||||
@@ -177,12 +177,12 @@ jobs:
|
|||||||
|
|
||||||
# Wait for container to be healthy
|
# Wait for container to be healthy
|
||||||
echo "Waiting for dev site to be healthy..."
|
echo "Waiting for dev site to be healthy..."
|
||||||
for i in {1..30}; do
|
for i in {1..6}; do
|
||||||
if curl -sf https://euchre-dev.notsosm.art/api/health > /dev/null 2>&1; then
|
if curl -sf https://euchre-dev.notsosm.art/api/health > /dev/null 2>&1; then
|
||||||
echo "✅ Dev environment successfully deployed with version ${{ steps.version.outputs.new_version }}"
|
echo "✅ Dev environment successfully deployed with version ${{ steps.version.outputs.new_version }}"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
sleep 0.5
|
sleep 15
|
||||||
done
|
done
|
||||||
echo "❌ Dev environment deployment failed"
|
echo "❌ Dev environment deployment failed"
|
||||||
docker compose logs app
|
docker compose logs app
|
||||||
|
|||||||
@@ -259,12 +259,12 @@ deploy-prod version:
|
|||||||
docker compose pull app && \
|
docker compose pull app && \
|
||||||
docker compose up -d app && \
|
docker compose up -d app && \
|
||||||
echo "Waiting for production site to be healthy..." && \
|
echo "Waiting for production site to be healthy..." && \
|
||||||
for i in {1..30}; do \
|
for i in {1..6}; do \
|
||||||
if curl -sf https://euchre.notsosm.art/api/health > /dev/null 2>&1; then \
|
if curl -sf https://euchre.notsosm.art/api/health > /dev/null 2>&1; then \
|
||||||
echo "✅ Production successfully deployed with version {{version}}"; \
|
echo "✅ Production successfully deployed with version {{version}}"; \
|
||||||
exit 0; \
|
exit 0; \
|
||||||
fi; \
|
fi; \
|
||||||
sleep 0.5; \
|
sleep 15; \
|
||||||
done && \
|
done && \
|
||||||
echo "❌ Production deployment failed - health check timed out"; \
|
echo "❌ Production deployment failed - health check timed out"; \
|
||||||
docker compose logs app; \
|
docker compose logs app; \
|
||||||
|
|||||||
Reference in New Issue
Block a user