Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ Deploy CUDly to Azure Container Apps. Serverless container platform with built-i

- `AZURE_LOCATION` (default: eastus)
- `ACR_NAME` (default: cudlyacr)
- `RESOURCE_GROUP` (default: cudly-rg)

### Example

Expand Down Expand Up @@ -503,7 +502,6 @@ gh variable set ARTIFACT_REGISTRY_REPO -b"cudly"
# Azure
gh variable set AZURE_LOCATION -b"eastus"
gh variable set ACR_NAME -b"cudlyacr"
gh variable set RESOURCE_GROUP -b"cudly-rg"

# Frontend
gh variable set CLOUD_PROVIDER -b"aws"
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/deploy-aws-fargate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,13 @@ jobs:
echo "Testing health endpoint: $URL/health"

for i in {1..10}; do
if curl -f -s "$URL/health" > /dev/null; then
RESPONSE=$(curl -s "$URL/health")
# /health reports but never triggers the lazy DB init on the HTTP
# server; any /api/ request does. /health below is the gate.
curl -s -o /dev/null --max-time 60 "$URL/api/auth/check-admin" || true
# /health returns HTTP 200 even when degraded; the body is the verdict.
if RESPONSE=$(curl -fsS --max-time 10 "$URL/health"); then
echo "Response: $RESPONSE"
if echo "$RESPONSE" | grep -q '"status"'; then
if jq -e '.status == "healthy"' > /dev/null <<< "$RESPONSE"; then
echo "Health check passed!"
exit 0
fi
Expand All @@ -310,11 +313,11 @@ jobs:
echo "Running basic smoke tests..."

for i in {1..3}; do
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL/health")
if [ "$STATUS" -eq 200 ]; then
echo "Health check $i: passed (HTTP $STATUS)"
if RESPONSE=$(curl -fsS --max-time 10 "$URL/health") &&
jq -e '.status == "healthy"' > /dev/null <<< "$RESPONSE"; then
echo "Health check $i: passed"
else
echo "Health check $i: failed (HTTP $STATUS)"
echo "Health check $i: failed: ${RESPONSE:-no response}"
exit 1
fi
sleep 2
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/deploy-aws-lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -418,10 +418,10 @@ jobs:
echo "Testing health endpoint: $URL/health"

for i in {1..5}; do
if curl -f -s "$URL/health" > /dev/null; then
RESPONSE=$(curl -s "$URL/health")
# /health returns HTTP 200 even when degraded; the body is the verdict.
if RESPONSE=$(curl -fsS --max-time 10 "$URL/health"); then
echo "Response: $RESPONSE"
if echo "$RESPONSE" | grep -q '"status"'; then
if jq -e '.status == "healthy"' > /dev/null <<< "$RESPONSE"; then
echo "Health check passed!"
exit 0
fi
Expand All @@ -442,11 +442,11 @@ jobs:
echo "Running basic smoke tests..."

for i in {1..3}; do
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL/health")
if [ "$STATUS" -eq 200 ]; then
echo "Health check $i: passed (HTTP $STATUS)"
if RESPONSE=$(curl -fsS --max-time 10 "$URL/health") &&
jq -e '.status == "healthy"' > /dev/null <<< "$RESPONSE"; then
echo "Health check $i: passed"
else
echo "Health check $i: failed (HTTP $STATUS)"
echo "Health check $i: failed: ${RESPONSE:-no response}"
exit 1
fi
sleep 2
Expand Down
41 changes: 25 additions & 16 deletions .github/workflows/deploy-azure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
# Required GitHub Variables:
# - AZURE_LOCATION: Azure region (e.g., eastus)
# - ACR_NAME: Azure Container Registry name
# - RESOURCE_GROUP: Azure resource group name
# - KEY_VAULT_NAME: Azure Key Vault name
#
# Triggered by:
Expand Down Expand Up @@ -63,7 +62,6 @@ on:
env:
AZURE_LOCATION: ${{ vars.AZURE_LOCATION || 'westus2' }}
ACR_NAME: ${{ vars.ACR_NAME || 'cudlyacr' }}
RESOURCE_GROUP: ${{ vars.RESOURCE_GROUP || 'cudly-rg' }}
TF_VERSION: '1.10.0'
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

Expand Down Expand Up @@ -167,6 +165,7 @@ jobs:
outputs:
app_url: ${{ steps.deploy.outputs.app_url }}
app_name: ${{ steps.deploy.outputs.app_name }}
resource_group_name: ${{ steps.deploy.outputs.resource_group_name }}
env:
ARM_USE_OIDC: "true"
ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
Expand Down Expand Up @@ -286,6 +285,9 @@ jobs:
APP_NAME=$(terraform output -raw container_app_name 2>/dev/null | grep -v '::' || echo "")
echo "app_name=$APP_NAME" >> "$GITHUB_OUTPUT"

RESOURCE_GROUP_NAME=$(terraform output -raw resource_group_name 2>/dev/null | grep -v '::' || echo "")
echo "resource_group_name=$RESOURCE_GROUP_NAME" >> "$GITHUB_OUTPUT"

# The provider fails the data read outright when the custom role is absent,
# so a Terraform precondition can never run for this case. Issue #1794: the
# Azure deploy failed on every main run since 2026-07-19 because the
Expand Down Expand Up @@ -439,10 +441,13 @@ jobs:
echo "Testing health endpoint: $URL/health"

for i in {1..5}; do
if curl -f -s "$URL/health" > /dev/null; then
RESPONSE=$(curl -s "$URL/health")
# /health reports but never triggers the lazy DB init on the HTTP
# server; any /api/ request does. /health below is the gate.
curl -s -o /dev/null --max-time 60 "$URL/api/auth/check-admin" || true
# /health returns HTTP 200 even when degraded; the body is the verdict.
if RESPONSE=$(curl -fsS --max-time 10 "$URL/health"); then
echo "Response: $RESPONSE"
if echo "$RESPONSE" | grep -q '"status"'; then
if jq -e '.status == "healthy"' > /dev/null <<< "$RESPONSE"; then
echo "Health check passed!"
exit 0
fi
Expand All @@ -461,11 +466,11 @@ jobs:
echo "Running basic smoke tests..."

for i in {1..3}; do
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL/health")
if [ "$STATUS" -eq 200 ]; then
echo "Health check $i: passed (HTTP $STATUS)"
if RESPONSE=$(curl -fsS --max-time 10 "$URL/health") &&
jq -e '.status == "healthy"' > /dev/null <<< "$RESPONSE"; then
echo "Health check $i: passed"
else
echo "Health check $i: failed (HTTP $STATUS)"
echo "Health check $i: failed: ${RESPONSE:-no response}"
exit 1
fi
sleep 2
Expand All @@ -474,15 +479,19 @@ jobs:
echo "All smoke tests passed!"

- name: Check Container App logs
env:
APP_NAME: ${{ needs.build-and-deploy.outputs.app_name }}
RESOURCE_GROUP_NAME: ${{ needs.build-and-deploy.outputs.resource_group_name }}
run: |
APP_NAME="${{ needs.build-and-deploy.outputs.app_name }}"
if [ -n "$APP_NAME" ]; then
echo "Recent Container App logs:"
az containerapp logs show \
--name $APP_NAME \
--resource-group ${{ env.RESOURCE_GROUP }} \
--tail 50 || true
if [ -z "$APP_NAME" ] || [ -z "$RESOURCE_GROUP_NAME" ]; then
echo "::error::Terraform outputs missing: app_name='$APP_NAME' resource_group_name='$RESOURCE_GROUP_NAME'"
exit 1
fi
echo "Recent Container App logs:"
az containerapp logs show \
--name "$APP_NAME" \
--resource-group "$RESOURCE_GROUP_NAME" \
--tail 50

# Post deployment summary
summary:
Expand Down
17 changes: 10 additions & 7 deletions .github/workflows/deploy-gcp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,13 @@ jobs:
echo "Testing health endpoint: $URL/health"

for i in {1..5}; do
if curl -f -s "$URL/health" > /dev/null; then
RESPONSE=$(curl -s "$URL/health")
# /health reports but never triggers the lazy DB init on the HTTP
# server; any /api/ request does. /health below is the gate.
curl -s -o /dev/null --max-time 60 "$URL/api/auth/check-admin" || true
# /health returns HTTP 200 even when degraded; the body is the verdict.
if RESPONSE=$(curl -fsS --max-time 10 "$URL/health"); then
echo "Response: $RESPONSE"
if echo "$RESPONSE" | grep -q '"status"'; then
if jq -e '.status == "healthy"' > /dev/null <<< "$RESPONSE"; then
echo "Health check passed!"
exit 0
fi
Expand All @@ -301,11 +304,11 @@ jobs:

# Test health endpoint multiple times
for i in {1..3}; do
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL/health")
if [ "$STATUS" -eq 200 ]; then
echo "Health check $i: passed (HTTP $STATUS)"
if RESPONSE=$(curl -fsS --max-time 10 "$URL/health") &&
jq -e '.status == "healthy"' > /dev/null <<< "$RESPONSE"; then
echo "Health check $i: passed"
else
echo "Health check $i: failed (HTTP $STATUS)"
echo "Health check $i: failed: ${RESPONSE:-no response}"
exit 1
fi
sleep 2
Expand Down
Loading