Skip to content
Merged
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
36 changes: 18 additions & 18 deletions .github/workflows/deploy-autopr-engine.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Deploy CodeFlow Engine
name: Build and Deploy CodeFlow Engine

on:
push:
Expand Down Expand Up @@ -42,16 +42,16 @@ jobs:
run: |
echo "Validating GitHub App manifest..."
python3 -c "import yaml; yaml.safe_load(open('.github/app-manifest.yml'))"
echo "✅ app-manifest.yml is valid YAML"
echo "[OK] app-manifest.yml is valid YAML"

- name: Validate .codeflow.yml config
run: |
if [ -f ".codeflow.yml" ]; then
echo "Validating .codeflow.yml..."
python3 -c "import yaml; yaml.safe_load(open('.codeflow.yml'))"
echo "✅ .codeflow.yml is valid YAML"
echo "[OK] .codeflow.yml is valid YAML"
else
echo "⚠️ .codeflow.yml not found (optional)"
echo "[!] .codeflow.yml not found (optional)"
fi

- name: Set up Docker Buildx
Expand All @@ -70,7 +70,7 @@ jobs:
RUN_TESTS=false

- name: Validate build
run: echo "✅ Docker image built successfully for PR validation"
run: echo "[OK] Docker image built successfully for PR validation"

build-and-push:
name: Build and Push Container Image
Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
ENV_NAME="prod-codeflow-san-env"
CUSTOM_DOMAIN="app.codeflow.io"

echo "🔍 Checking for existing managed certificates for domain: $CUSTOM_DOMAIN"
echo "[*] Checking for existing managed certificates for domain: $CUSTOM_DOMAIN"

# Check if environment exists
if az containerapp env show -n $ENV_NAME -g $RESOURCE_GROUP &>/dev/null; then
Expand All @@ -214,10 +214,10 @@ jobs:
'.[] | select(.properties.subjectName == $domain and .type == "Microsoft.App/managedEnvironments/managedCertificates") | .name')

if [ -n "$DUPLICATE_CERTS" ]; then
echo "⚠️ Found duplicate managed certificate(s) for domain $CUSTOM_DOMAIN:"
echo "[!] Found duplicate managed certificate(s) for domain $CUSTOM_DOMAIN:"
echo "$DUPLICATE_CERTS"
echo ""
echo "🗑️ Removing duplicate certificates to prevent deployment conflicts..."
echo "[*] Removing duplicate certificates to prevent deployment conflicts..."

while IFS= read -r cert_name; do
if [ -n "$cert_name" ]; then
Expand All @@ -226,23 +226,23 @@ jobs:
--name $ENV_NAME \
--resource-group $RESOURCE_GROUP \
--certificate "$cert_name" \
--yes || echo "⚠️ Failed to delete certificate $cert_name (may not exist or be in use)"
--yes || echo "[!] Failed to delete certificate $cert_name (may not exist or be in use)"
fi
done <<< "$DUPLICATE_CERTS"

echo "✅ Cleanup completed"
echo "[OK] Cleanup completed"
else
echo "✅ No duplicate certificates found for $CUSTOM_DOMAIN"
echo "[OK] No duplicate certificates found for $CUSTOM_DOMAIN"
fi
else
echo "ℹ️ Environment does not exist yet, skipping certificate cleanup"
echo "[i] Environment does not exist yet, skipping certificate cleanup"
fi
echo ""

- name: Deploy Bicep Template
run: |
echo "ℹ️ Note: SSL certificates are automatically managed by Azure. No certificate upload needed!"
echo "📖 See infrastructure/bicep/FAQ.md for certificate details"
echo "[i] Note: SSL certificates are automatically managed by Azure. No certificate upload needed!"
echo "[*] See infrastructure/bicep/FAQ.md for certificate details"
echo ""
az deployment group create \
--name codeflow-engine \
Expand Down Expand Up @@ -274,18 +274,18 @@ jobs:

- name: Display deployment info
run: |
echo "✅ Deployment successful!"
echo "[OK] Deployment successful!"
echo "Container App URL: ${{ steps.outputs.outputs.container_app_url }}"
echo "Custom Domain: ${{ steps.outputs.outputs.custom_domain }}"
echo "PostgreSQL FQDN: ${{ steps.outputs.outputs.postgres_fqdn }}"
echo "Redis Host: ${{ steps.outputs.outputs.redis_host }}"
echo ""
echo "🔒 SSL Certificate: Automatically managed by Azure (no action needed)"
echo "[*] SSL Certificate: Automatically managed by Azure (no action needed)"
echo ""
echo "⚠️ Next steps:"
echo "[!] Next steps:"
echo "1. Add DNS CNAME record: ${{ steps.outputs.outputs.custom_domain }} -> Container App FQDN"
echo "2. Wait for DNS propagation (typically 15-30 minutes)"
echo "3. Azure will automatically provision and bind the SSL certificate (5-15 minutes)"
echo ""
echo "📖 For troubleshooting, see: infrastructure/bicep/FAQ.md"
echo "[*] For troubleshooting, see: infrastructure/bicep/FAQ.md"