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
# "body": "<p>Dear Team,</p><p>We would like to inform you that the Multi-Agent-Custom-Automation-Engine-Solution-Accelerator Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Build URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>"
372
-
# }
373
-
# EOF
374
-
# )
375
-
376
-
# # Send the notification
377
-
# curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
378
-
# -H "Content-Type: application/json" \
379
-
# -d "$EMAIL_BODY" || echo "Failed to send notification"
if ! az resource delete --ids /subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/providers/Microsoft.CognitiveServices/locations/eastus/resourceGroups/${{ env.RESOURCE_GROUP_NAME }}/deletedAccounts/${{ env.OPENAI_RESOURCE_NAME }} --verbose; then
356
+
echo "Failed to purge openai resource: ${{ env.OPENAI_RESOURCE_NAME }}"
357
+
else
358
+
echo "Purged the openai resource: ${{ env.OPENAI_RESOURCE_NAME }}"
"body": "<p>Dear Team,</p><p>We would like to inform you that the Multi-Agent-Custom-Automation-Engine-Solution-Accelerator Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Build URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>"
372
+
}
373
+
EOF
374
+
)
375
+
376
+
# Send the notification
377
+
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
378
+
-H "Content-Type: application/json" \
379
+
-d "$EMAIL_BODY" || echo "Failed to send notification"
# "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>",
164
-
# "subject": "${{ env.accelerator_name }} Test Automation - Success"
165
-
# }
166
-
# EOF
167
-
# )
168
-
# else
169
-
# EMAIL_BODY=$(cat <<EOF
170
-
# {
171
-
# "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></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>",
172
-
# "subject": "${{ env.accelerator_name }} Test Automation - Failure"
173
-
# }
174
-
# EOF
175
-
# )
176
-
# fi
177
-
178
-
# curl -X POST "${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}" \
179
-
# -H "Content-Type: application/json" \
180
-
# -d "$EMAIL_BODY" || echo "Failed to send notification"
181
-
182
-
#- name: Stop Container App
183
-
# if: always()
184
-
# uses: azure/cli@v2
185
-
# with:
186
-
# azcliversion: "latest"
187
-
# inlineScript: |
188
-
# az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ env.MACAE_RG }}/providers/Microsoft.App/containerApps/${{ env.MACAE_CONTAINER_APP }}/stop?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>",
164
+
"subject": "${{ env.accelerator_name }} Test Automation - Success"
165
+
}
166
+
EOF
167
+
)
168
+
else
169
+
EMAIL_BODY=$(cat <<EOF
170
+
{
171
+
"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></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>",
172
+
"subject": "${{ env.accelerator_name }} Test Automation - Failure"
173
+
}
174
+
EOF
175
+
)
176
+
fi
177
+
178
+
curl -X POST "${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}" \
179
+
-H "Content-Type: application/json" \
180
+
-d "$EMAIL_BODY" || echo "Failed to send notification"
181
+
182
+
- name: Stop Container App
183
+
if: always()
184
+
uses: azure/cli@v2
185
+
with:
186
+
azcliversion: "latest"
187
+
inlineScript: |
188
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ env.MACAE_RG }}/providers/Microsoft.App/containerApps/${{ env.MACAE_CONTAINER_APP }}/stop?api-version=2025-01-01"
0 commit comments