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
534
+
if [ "$IS_SUCCESS" = "true" ]; then
535
+
EMAIL_BODY=$(cat <<EOF
536
+
{
537
+
"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>",
538
+
"subject": "DocGen Deployment - Success"
539
+
}
540
+
EOF
541
+
)
542
+
else
543
+
EMAIL_BODY=$(cat <<EOF
544
+
{
545
+
"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>",
546
+
"subject": "DocGen Deployment - Failure"
547
+
}
548
+
EOF
549
+
)
550
+
fi
551
+
# Send the notification
552
+
curl -X POST "${{ secrets.LOGIC_APP_URL }}" \
553
+
-H "Content-Type: application/json" \
554
+
-d "$EMAIL_BODY" || echo "Failed to send notification"
0 commit comments