Compare commits

...

6 Commits

View File

@@ -221,46 +221,17 @@ jobs:
cache-to: type=gha,mode=max,scope=frontend cache-to: type=gha,mode=max,scope=frontend
# ─────────────────────────────────────────────────────────────────────────── # ───────────────────────────────────────────────────────────────────────────
# ADIM 3 — Public URL health check # ADIM 3 — Deploy tamamlandi
# K8s deploy Gitea mirror Argo CD ile asenkron ilerler (~5-10 dk). # Asil deploy Gitea mirror + Argo CD ile asenkron gerceklesir.
# GHCR image push'tan 5 dk bekle, ardından public frontend URL'i kontrol et.
# ─────────────────────────────────────────────────────────────────────────── # ───────────────────────────────────────────────────────────────────────────
verify: verify:
name: ✅ Verify Deployment name: Deploy Complete
needs: [build-push-backend, build-push-frontend] needs: [build-push-backend, build-push-frontend]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Wait for Argo CD rolling update - name: Images pushed
run: | run: echo "GHCR images pushed. K8s rolling update via Argo CD (async)."
echo "⏳ Waiting 5 minutes for Argo CD to pick up new image..."
sleep 60
- name: Public URL health check
run: |
MAX=15
INTERVAL=20
FRONTEND_URL="https://trendyol.194.187.253.230.sslip.io"
BACKEND_URL="https://trendyol-api.194.187.253.230.sslip.io/health"
echo "🔍 Checking frontend: $FRONTEND_URL"
for i in $(seq 1 $MAX); do
CODE=$(curl -sL -o /dev/null -w "%{http_code}" --max-time 15 "$FRONTEND_URL" 2>/dev/null || echo "000")
echo "[$i/$MAX] Frontend → HTTP $CODE"
if [ "$CODE" = "200" ] || [ "$CODE" = "302" ] || [ "$CODE" = "307" ]; then
echo "✅ Frontend canlı"
break
fi
[ "$i" -lt "$MAX" ] && sleep $INTERVAL
done
echo "🔍 Checking backend: $BACKEND_URL"
CODE=$(curl -sL -o /dev/null -w "%{http_code}" --max-time 15 "$BACKEND_URL" 2>/dev/null || echo "000")
if [ "$CODE" = "200" ]; then
echo "✅ Backend canlı (HTTP $CODE)"
else
echo "⚠️ Backend HTTP $CODE — Argo CD sync devam ediyor olabilir"
fi
# ─────────────────────────────────────────────────────────────────────────── # ───────────────────────────────────────────────────────────────────────────
# Hata bildirimi — GitHub Issue otomatik aç # Hata bildirimi — GitHub Issue otomatik aç