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 ${{ 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>",
104
+
"subject": "${{ env.accelerator_name }} Test Automation - Success"
105
+
}
106
+
EOF
107
+
)
108
+
else
109
+
EMAIL_BODY=$(cat <<EOF
110
+
{
111
+
"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>",
112
+
"subject": "${{ env.accelerator_name }} Test Automation - Failure"
113
+
}
114
+
EOF
115
+
)
116
+
fi
117
+
118
+
# Send the notification
119
+
curl -X POST "${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}" \
120
+
-H "Content-Type: application/json" \
121
+
-d "$EMAIL_BODY" || echo "Failed to send notification"
122
+
123
+
- name: Stop Container App
124
+
if: always()
125
+
uses: azure/cli@v2
126
+
with:
127
+
azcliversion: 'latest'
128
+
inlineScript: |
129
+
az rest -m post -u "/subscriptions/${{ secrets.AZURE_SUBSCRIPTION_ID }}/resourceGroups/${{ vars.MACAE_RG }}/providers/Microsoft.App/containerApps/${{ vars.MACAE_BACKEND_CONTAINER_NAME }}/stop?api-version=2025-01-01"
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
37
+
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR} to use the value of 'VAR' from the current environment."
38
+
},
39
+
{
40
+
"name": "",
41
+
"value": "${VAR_S}",
42
+
"secret": true,
43
+
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
44
+
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR_S} to use the value of 'VAR_S' from the current environment."
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
59
+
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR} to use the value of 'VAR' from the current environment."
60
+
},
61
+
{
62
+
"name": "",
63
+
"value": "${VAR_S}",
64
+
"secret": true,
65
+
"_comment_name": "The name of the environment variable when running in Azure. If empty, ignored.",
66
+
"_comment_value": "The value to provide. This can be a fixed literal, or an expression like ${VAR_S} to use the value of 'VAR_S' from the current environment."
0 commit comments