Skip to content

Commit 19baf16

Browse files
Merge pull request #779 from microsoft/psl-update-notifications
ci: refactor notification email templates
2 parents 4988cd3 + 20534cd commit 19baf16

File tree

2 files changed

+121
-224
lines changed

2 files changed

+121
-224
lines changed

.github/workflows/deploy-orchestrator.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,25 @@ jobs:
108108
TEST_SUITE: ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.run_e2e_tests || 'GoldenPath-Testing' }}
109109
secrets: inherit
110110

111+
cleanup-deployment:
112+
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
113+
needs: [docker-build, deploy, e2e-test]
114+
uses: ./.github/workflows/job-cleanup-deployment.yml
115+
with:
116+
runner_os: ${{ inputs.runner_os }}
117+
trigger_type: ${{ inputs.trigger_type }}
118+
cleanup_resources: ${{ inputs.cleanup_resources }}
119+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
120+
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
121+
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
122+
AZURE_ENV_OPENAI_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
123+
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
124+
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
125+
secrets: inherit
126+
111127
send-notification:
112128
if: "!cancelled()"
113-
needs: [docker-build, deploy, e2e-test]
129+
needs: [docker-build, deploy, e2e-test, cleanup-deployment]
114130
uses: ./.github/workflows/job-send-notification.yml
115131
with:
116132
trigger_type: ${{ inputs.trigger_type }}
@@ -125,20 +141,5 @@ jobs:
125141
QUOTA_FAILED: ${{ needs.deploy.outputs.QUOTA_FAILED }}
126142
TEST_SUCCESS: ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
127143
TEST_REPORT_URL: ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
128-
secrets: inherit
129-
130-
cleanup-deployment:
131-
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
132-
needs: [docker-build, deploy, e2e-test]
133-
uses: ./.github/workflows/job-cleanup-deployment.yml
134-
with:
135-
runner_os: ${{ inputs.runner_os }}
136-
trigger_type: ${{ inputs.trigger_type }}
137-
cleanup_resources: ${{ inputs.cleanup_resources }}
138-
existing_webapp_url: ${{ inputs.existing_webapp_url }}
139-
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
140-
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
141-
AZURE_ENV_OPENAI_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
142-
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
143-
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
144+
cleanup_result: ${{ needs.cleanup-deployment.result }}
144145
secrets: inherit

0 commit comments

Comments
 (0)