From f16ad054ddac6223ee198c8bb23514ba8f7d0cdb Mon Sep 17 00:00:00 2001 From: David Gwilliam Date: Mon, 18 May 2026 16:55:45 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20extend=20CI=20health=20check=20timeout?= =?UTF-8?q?=20from=2015s=20to=2090s=20(6=20retries=20=C3=97=2015s)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/deploy-prod.yml | 4 ++-- .gitea/workflows/pr.yml | 12 +++++++----- .gitea/workflows/release.yml | 4 ++-- justfile | 4 ++-- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/.gitea/workflows/deploy-prod.yml b/.gitea/workflows/deploy-prod.yml index c6b6770..ee1d292 100644 --- a/.gitea/workflows/deploy-prod.yml +++ b/.gitea/workflows/deploy-prod.yml @@ -40,12 +40,12 @@ jobs: # Wait 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 echo "✅ Production successfully deployed with version ${VERSION}" exit 0 fi - sleep 0.5 + sleep 15 done echo "❌ Production deployment failed" docker compose logs app diff --git a/.gitea/workflows/pr.yml b/.gitea/workflows/pr.yml index c557378..c980ae0 100644 --- a/.gitea/workflows/pr.yml +++ b/.gitea/workflows/pr.yml @@ -83,14 +83,16 @@ jobs: - name: Wait for CI site to be ready run: | - for i in {1..15}; do - if docker ps --filter name=euchre-camp-ci --format '{{.Status}}' | grep -q Up; then - echo "CI site container is running" + for i in {1..6}; do + if curl -sf https://euchre-ci.notsosm.art/api/health > /dev/null 2>&1; then + echo "CI site is healthy" exit 0 fi - sleep 2 + sleep 15 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 exit 1 diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index caa9890..5e3b5be 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -177,12 +177,12 @@ jobs: # Wait for container 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 echo "✅ Dev environment successfully deployed with version ${{ steps.version.outputs.new_version }}" exit 0 fi - sleep 0.5 + sleep 15 done echo "❌ Dev environment deployment failed" docker compose logs app diff --git a/justfile b/justfile index 2c73d0c..3aa36eb 100644 --- a/justfile +++ b/justfile @@ -259,12 +259,12 @@ deploy-prod version: docker compose pull app && \ docker compose up -d app && \ 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 \ echo "✅ Production successfully deployed with version {{version}}"; \ exit 0; \ fi; \ - sleep 0.5; \ + sleep 15; \ done && \ echo "❌ Production deployment failed - health check timed out"; \ docker compose logs app; \