You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ vars.CODEGEN_RG }}/providers/Microsoft.App/containerApps/${{ vars.CODEGEN_FRONTEND_CONTAINER_NAME }}/start?api-version=2025-01-01"
47
+
# az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ vars.CODEGEN_RG }}/providers/Microsoft.App/containerApps/${{ vars.CODEGEN_BACKEND_CONTAINER_NAME }}/start?api-version=2025-01-01"
48
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/codegen-automation/providers/Microsoft.App/containerApps/cm3ydcorjzov5mfrontend/start?api-version=2025-01-01"
49
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/codegen-automation/providers/Microsoft.App/containerApps/cm3ydcorjzov5mbackend/start?api-version=2025-01-01"
"body": "<p>Dear Team,</p><p>We would like to inform you that the ${{ env.accelerator_name }} Test Automation process has completed successfully.</p><p><strong>Run URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p><strong>Test Report:</strong> ${REPORT_URL}</p><p>Best regards,<br>Your Automation Team</p>",
111
+
"subject": "${{ env.accelerator_name }} Test Automation - Success"
112
+
}
113
+
EOF
114
+
)
115
+
else
116
+
EMAIL_BODY=$(cat <<EOF
117
+
{
118
+
"body": "<p>Dear Team,</p><p>We would like to inform you that the ${{ env.accelerator_name }} Test Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Run URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p><strong>Test Report:</strong> ${REPORT_URL}</p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>",
119
+
"subject": "${{ env.accelerator_name }} Test Automation - Failure"
120
+
}
121
+
EOF
122
+
)
123
+
fi
124
+
125
+
# Send the notification
126
+
curl -X POST "${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}" \
127
+
-H "Content-Type: application/json" \
128
+
-d "$EMAIL_BODY" || echo "Failed to send notification"
129
+
130
+
- name: Stop Container App
131
+
if: always()
132
+
uses: azure/cli@v2
133
+
with:
134
+
azcliversion: 'latest'
135
+
inlineScript: |
136
+
# az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ vars.CodeGen_RG }}/providers/Microsoft.App/containerApps/${{ vars.CODEGEN_FRONTEND_CONTAINER_NAME }}/stop?api-version=2025-01-01"
137
+
# az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ vars.CodeGen_RG }}/providers/Microsoft.App/containerApps/${{ vars.CODEGEN_BACKEND_CONTAINER_NAME }}/stop?api-version=2025-01-01"
138
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/codegen-automation/providers/Microsoft.App/containerApps/cm3ydcorjzov5mfrontend/stop?api-version=2025-01-01"
139
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/codegen-automation/providers/Microsoft.App/containerApps/cm3ydcorjzov5mbackend/stop?api-version=2025-01-01"
0 commit comments