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
# Construct the email body based on deployment result
609
-
if [ "$IS_SUCCESS" = "true" ]; then
610
-
EMAIL_BODY=$(cat <<EOF
611
-
{
612
-
"body": "<p>Dear Team,</p><p>We would like to inform you that the DocGen deployment process has completed successfully.</p><p><strong>Deployment Details:</strong><br>• Resource Group: ${RESOURCE_GROUP}<br>• Web App URL: <a href=\"${WEBAPP_URL}\">${WEBAPP_URL}</a></p><p><strong>Run URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a></p><p>The application is now ready for use.</p><p>Best regards,<br>Your Automation Team</p>",
613
-
"subject": "DocGen Deployment - Success"
614
-
}
615
-
EOF
616
-
)
617
-
else
618
-
EMAIL_BODY=$(cat <<EOF
619
-
{
620
-
"body": "<p>Dear Team,</p><p>We would like to inform you that the DocGen deployment process has encountered an issue and has failed to complete successfully.</p><p><strong>Deployment Details:</strong><br>• Resource Group: ${RESOURCE_GROUP}</p><p><strong>Run URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a></p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>",
621
-
"subject": "DocGen Deployment - Failure"
622
-
}
623
-
EOF
624
-
)
625
-
fi
626
-
# Send the notification
627
-
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
628
-
-H "Content-Type: application/json" \
629
-
-d "$EMAIL_BODY" || echo "Failed to send notification"
"body": "<p>Dear Team,</p><p>We would like to inform you that the document-generation-solution-accelerator Unified Deployment process has encountered an issue and has failed to complete successfully.</p><p><strong>Configuration:</strong><br>- WAF Enabled: ${WAF_STATUS}<br>- EXP: ${EXP_STATUS}<br>- Cleanup: ${CLEANUP_STATUS}</p><p><strong>Build URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a></p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>"
798
-
}
799
-
EOF
800
-
)
801
749
802
-
# Send the notification
803
-
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
804
-
-H "Content-Type: application/json" \
805
-
-d "$EMAIL_BODY" || echo "Failed to send notification"
806
750
807
751
- name: Logout from Azure
808
752
if: always()
@@ -841,3 +785,151 @@ jobs:
841
785
echo "- Some resources may still exist in Azure" >> $GITHUB_STEP_SUMMARY
842
786
echo "- Manual cleanup may be required" >> $GITHUB_STEP_SUMMARY
"body": "<p>Dear Team,</p><p>We would like to inform you that the DocGen deployment has failed due to insufficient Azure quota in the requested regions.</p><p><strong>Issue Details:</strong><br>• Quota check failed for GPT and Text Embedding models<br>• Required GPT Capacity: ${{ env.GPT_MIN_CAPACITY }}<br>• Required Text Embedding Capacity: ${{ env.TEXT_EMBEDDING_MIN_CAPACITY }}<br>• Checked Regions: ${{ vars.AZURE_REGIONS }}</p><p><strong>Action Required:</strong><br>• Increase quota limits in Azure portal<br>• Or select a different region with available quota</p><p><strong>Build URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a></p><p>Please resolve the quota issue and retry the deployment.</p><p>Best regards,<br>Your Automation Team</p>",
811
+
"subject": "DocGen Pipeline - Quota Check Failed"
812
+
}
813
+
EOF
814
+
)
815
+
816
+
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
817
+
-H "Content-Type: application/json" \
818
+
-d "$EMAIL_BODY" || echo "Failed to send quota failure notification"
"body": "<p>Dear Team,</p><p>We would like to inform you that the DocGen deployment process has encountered an issue and has failed to complete successfully.</p><p><strong>Deployment Details:</strong><br>• Resource Group: ${RESOURCE_GROUP}<br>• Docker Image Tag: ${IMAGE_TAG}<br>• WAF Enabled: ${{ env.WAF_ENABLED }}<br>• EXP Enabled: ${{ env.EXP }}<br>• Branch: ${{ env.BRANCH_NAME }}</p><p><strong>Build URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a></p><p>Please investigate the deployment failure at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>",
830
+
"subject": "DocGen Deployment - Failed"
831
+
}
832
+
EOF
833
+
)
834
+
835
+
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
836
+
-H "Content-Type: application/json" \
837
+
-d "$EMAIL_BODY" || echo "Failed to send deployment failure notification"
TEST_STATUS_MSG="• E2E Tests: ✅ Passed<br>• Test Report: <a href=\"${TEST_REPORT_URL}\">View Report</a>"
853
+
fi
854
+
855
+
EMAIL_BODY=$(cat <<EOF
856
+
{
857
+
"body": "<p>Dear Team,</p><p>We would like to inform you that the DocGen deployment and testing process has completed successfully.</p><p><strong>Deployment Details:</strong><br>• Resource Group: ${RESOURCE_GROUP}<br>• Web App URL: <a href=\"${WEBAPP_URL}\">${WEBAPP_URL}</a><br>• Docker Image Tag: ${IMAGE_TAG}<br>${TEST_STATUS_MSG}</p><p><strong>Configuration:</strong><br>• WAF Enabled: ${{ env.WAF_ENABLED }}<br>• EXP Enabled: ${{ env.EXP }}<br>• Branch: ${{ env.BRANCH_NAME }}</p><p><strong>Build URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a></p><p>The application is now ready for use.</p><p>Best regards,<br>Your Automation Team</p>",
858
+
"subject": "DocGen Pipeline - Success"
859
+
}
860
+
EOF
861
+
)
862
+
863
+
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
864
+
-H "Content-Type: application/json" \
865
+
-d "$EMAIL_BODY" || echo "Failed to send success notification"
"body": "<p>Dear Team,</p><p>We would like to inform you that while the DocGen deployment was successful, the E2E test automation process has encountered issues and failed to complete successfully.</p><p><strong>Deployment Details:</strong><br>• Resource Group: ${RESOURCE_GROUP}<br>• Web App URL: <a href=\"${WEBAPP_URL}\">${WEBAPP_URL}</a><br>• Deployment Status: ✅ Success<br>• E2E Tests: ❌ Failed</p><p><strong>Test Details:</strong><br>• Test Report: <a href=\"${TEST_REPORT_URL}\">View Report</a></p><p><strong>Build URL:</strong> <a href=\"${RUN_URL}\">${RUN_URL}</a></p><p>The application has been deployed successfully, but please investigate the test failures to ensure functionality.</p><p>Best regards,<br>Your Automation Team</p>",
"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>",
99
-
"subject": "${{ env.accelerator_name }} Test Automation - Success"
100
-
}
101
-
EOF
102
-
)
103
-
else
104
-
EMAIL_BODY=$(cat <<EOF
105
-
{
106
-
"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>",
107
-
"subject": "${{ env.accelerator_name }} Test Automation - Failure"
108
-
}
109
-
EOF
110
-
)
111
-
fi
112
98
113
-
# Send the notification
114
-
curl -X POST "${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}" \
115
-
-H "Content-Type: application/json" \
116
-
-d "$EMAIL_BODY" || echo "Failed to send notification"
0 commit comments