mirror of
https://github.com/ghndrx/k8s-game-2048.git
synced 2026-02-10 06:45:07 +00:00
fix: Update workflows to use environment-specific domain secrets
- Add DEV_DOMAIN, STAGING_DOMAIN, PROD_DOMAIN secrets - Update health check URLs to use correct environment subdomains: - Dev: game-2048-dev.game-2048-dev.dev.wa.darknex.us - Staging: game-2048-staging.game-2048-staging.staging.wa.darknex.us - Prod: game-2048-prod.game-2048-prod.wa.darknex.us - This should fix the health check failures in workflows
This commit is contained in:
4
.github/workflows/deploy-dev.yml
vendored
4
.github/workflows/deploy-dev.yml
vendored
@@ -98,7 +98,7 @@ jobs:
|
|||||||
|
|
||||||
# Get the canonical Knative domain for health check
|
# Get the canonical Knative domain for health check
|
||||||
# Format: service-name.namespace.knative-domain
|
# Format: service-name.namespace.knative-domain
|
||||||
HEALTH_URL="https://game-2048-dev.game-2048-dev.${{ secrets.KNATIVE_DOMAIN }}"
|
HEALTH_URL="https://game-2048-dev.game-2048-dev.${{ secrets.DEV_DOMAIN }}"
|
||||||
|
|
||||||
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
||||||
echo "Attempt $((RETRY_COUNT + 1))/$MAX_RETRIES - Checking: $HEALTH_URL"
|
echo "Attempt $((RETRY_COUNT + 1))/$MAX_RETRIES - Checking: $HEALTH_URL"
|
||||||
@@ -131,7 +131,7 @@ jobs:
|
|||||||
|
|
||||||
if [ "${{ job.status }}" = "success" ]; then
|
if [ "${{ job.status }}" = "success" ]; then
|
||||||
echo "- **Status:** ✅ Success" >> $GITHUB_STEP_SUMMARY
|
echo "- **Status:** ✅ Success" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- **URL:** https://game-2048-dev.game-2048-dev.${{ secrets.KNATIVE_DOMAIN }}" >> $GITHUB_STEP_SUMMARY
|
echo "- **URL:** https://game-2048-dev.game-2048-dev.${{ secrets.DEV_DOMAIN }}" >> $GITHUB_STEP_SUMMARY
|
||||||
else
|
else
|
||||||
echo "- **Status:** ❌ Failed" >> $GITHUB_STEP_SUMMARY
|
echo "- **Status:** ❌ Failed" >> $GITHUB_STEP_SUMMARY
|
||||||
fi
|
fi
|
||||||
|
|||||||
6
.github/workflows/deploy-prod.yml
vendored
6
.github/workflows/deploy-prod.yml
vendored
@@ -117,7 +117,7 @@ jobs:
|
|||||||
RETRY_COUNT=0
|
RETRY_COUNT=0
|
||||||
|
|
||||||
# Get the canonical Knative domain for health check
|
# Get the canonical Knative domain for health check
|
||||||
HEALTH_URL="https://game-2048-prod.game-2048-prod.${{ secrets.KNATIVE_DOMAIN }}"
|
HEALTH_URL="https://game-2048-prod.game-2048-prod.${{ secrets.PROD_DOMAIN }}"
|
||||||
|
|
||||||
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
||||||
echo "Attempt $((RETRY_COUNT + 1))/$MAX_RETRIES - Checking: $HEALTH_URL"
|
echo "Attempt $((RETRY_COUNT + 1))/$MAX_RETRIES - Checking: $HEALTH_URL"
|
||||||
@@ -172,10 +172,10 @@ jobs:
|
|||||||
|
|
||||||
if [ "${{ job.status }}" = "success" ]; then
|
if [ "${{ job.status }}" = "success" ]; then
|
||||||
echo "- **Status:** ✅ **LIVE IN PRODUCTION**" >> $GITHUB_STEP_SUMMARY
|
echo "- **Status:** ✅ **LIVE IN PRODUCTION**" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- **URL:** https://game-2048-prod.game-2048-prod.${{ secrets.KNATIVE_DOMAIN }}" >> $GITHUB_STEP_SUMMARY
|
echo "- **URL:** https://game-2048-prod.game-2048-prod.${{ secrets.PROD_DOMAIN }}" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "" >> $GITHUB_STEP_SUMMARY
|
echo "" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "### 🎉 Production is Live!" >> $GITHUB_STEP_SUMMARY
|
echo "### 🎉 Production is Live!" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- 🎮 [Play the game](https://game-2048-prod.game-2048-prod.${{ secrets.KNATIVE_DOMAIN }})" >> $GITHUB_STEP_SUMMARY
|
echo "- 🎮 [Play the game](https://game-2048-prod.game-2048-prod.${{ secrets.PROD_DOMAIN }})" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- 🧪 [Run smoke tests](https://github.com/${{ github.repository }}/actions/workflows/smoke-test.yml)" >> $GITHUB_STEP_SUMMARY
|
echo "- 🧪 [Run smoke tests](https://github.com/${{ github.repository }}/actions/workflows/smoke-test.yml)" >> $GITHUB_STEP_SUMMARY
|
||||||
else
|
else
|
||||||
echo "- **Status:** ❌ Failed" >> $GITHUB_STEP_SUMMARY
|
echo "- **Status:** ❌ Failed" >> $GITHUB_STEP_SUMMARY
|
||||||
|
|||||||
4
.github/workflows/deploy-staging.yml
vendored
4
.github/workflows/deploy-staging.yml
vendored
@@ -94,7 +94,7 @@ jobs:
|
|||||||
RETRY_COUNT=0
|
RETRY_COUNT=0
|
||||||
|
|
||||||
# Get the canonical Knative domain for health check
|
# Get the canonical Knative domain for health check
|
||||||
HEALTH_URL="https://game-2048-staging.game-2048-staging.${{ secrets.KNATIVE_DOMAIN }}"
|
HEALTH_URL="https://game-2048-staging.game-2048-staging.${{ secrets.STAGING_DOMAIN }}"
|
||||||
|
|
||||||
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do
|
||||||
echo "Attempt $((RETRY_COUNT + 1))/$MAX_RETRIES - Checking: $HEALTH_URL"
|
echo "Attempt $((RETRY_COUNT + 1))/$MAX_RETRIES - Checking: $HEALTH_URL"
|
||||||
@@ -133,7 +133,7 @@ jobs:
|
|||||||
|
|
||||||
if [ "${{ job.status }}" = "success" ]; then
|
if [ "${{ job.status }}" = "success" ]; then
|
||||||
echo "- **Status:** ✅ Success" >> $GITHUB_STEP_SUMMARY
|
echo "- **Status:** ✅ Success" >> $GITHUB_STEP_SUMMARY
|
||||||
echo "- **URL:** https://game-2048-staging.game-2048-staging.${{ secrets.KNATIVE_DOMAIN }}" >> $GITHUB_STEP_SUMMARY
|
echo "- **URL:** https://game-2048-staging.game-2048-staging.${{ secrets.STAGING_DOMAIN }}" >> $GITHUB_STEP_SUMMARY
|
||||||
else
|
else
|
||||||
echo "- **Status:** ❌ Failed" >> $GITHUB_STEP_SUMMARY
|
echo "- **Status:** ❌ Failed" >> $GITHUB_STEP_SUMMARY
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user