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.CP_RG }}/providers/Microsoft.App/containerApps/${{ vars.CP_CONTAINERAPP_PREFIX }}-app/start?api-version=2025-01-01"
48
+
# az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ vars.CP_RG }}/providers/Microsoft.App/containerApps/${{ vars.CP_CONTAINERAPP_PREFIX }}-api/start?api-version=2025-01-01"
49
+
# az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ vars.CP_RG }}/providers/Microsoft.App/containerApps/${{ vars.CP_CONTAINERAPP_PREFIX }}-web/start?api-version=2025-01-01"
50
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/rg-cps-gp-testautomation/providers/Microsoft.App/containerApps/ca-cps-7kptilcf2uq4-app/start?api-version=2025-01-01"
51
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/rg-cps-gp-testautomation/providers/Microsoft.App/containerApps/ca-cps-7kptilcf2uq4-api/start?api-version=2025-01-01"
52
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/rg-cps-gp-testautomation/providers/Microsoft.App/containerApps/ca-cps-7kptilcf2uq4-web/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> <a href=\"${RUN_URL}\">${RUN_URL}</a><br></p><p><strong>Test Report:</strong> <a href=\"${REPORT_URL}\">${REPORT_URL}</a></p><p>Best regards,<br>Your Automation Team</p>",
113
+
"subject": "${{ env.accelerator_name }} Test Automation - Success"
114
+
}
115
+
EOF
116
+
)
117
+
else
118
+
EMAIL_BODY=$(cat <<EOF
119
+
{
120
+
"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> <a href=\"${RUN_URL}\">${RUN_URL}</a><br> ${OUTPUT}</p><p><strong>Test Report:</strong> <a href=\"${REPORT_URL}\">${REPORT_URL}</a></p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>",
121
+
"subject": "${{ env.accelerator_name }} Test Automation - Failure"
122
+
}
123
+
EOF
124
+
)
125
+
fi
126
+
127
+
# Send the notification
128
+
curl -X POST "${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}" \
129
+
-H "Content-Type: application/json" \
130
+
-d "$EMAIL_BODY" || echo "Failed to send notification"
131
+
132
+
- name: Stop Container App
133
+
if: always()
134
+
uses: azure/cli@v2
135
+
with:
136
+
azcliversion: 'latest'
137
+
inlineScript: |
138
+
# az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ vars.CP_RG }}/providers/Microsoft.App/containerApps/${{ vars.CP_CONTAINERAPP_PREFIX }}-app/stop?api-version=2025-01-01"
139
+
# az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ vars.CP_RG }}/providers/Microsoft.App/containerApps/${{ vars.CP_CONTAINERAPP_PREFIX }}-api/stop?api-version=2025-01-01"
140
+
# az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ vars.CP_RG }}/providers/Microsoft.App/containerApps/${{ vars.CP_CONTAINERAPP_PREFIX }}-web/stop?api-version=2025-01-01"
141
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/rg-cps-gp-testautomation/providers/Microsoft.App/containerApps/ca-cps-7kptilcf2uq4-app/stop?api-version=2025-01-01"
142
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/rg-cps-gp-testautomation/providers/Microsoft.App/containerApps/ca-cps-7kptilcf2uq4-api/stop?api-version=2025-01-01"
143
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/rg-cps-gp-testautomation/providers/Microsoft.App/containerApps/ca-cps-7kptilcf2uq4-web/stop?api-version=2025-01-01"
0 commit comments