Skip to content

Commit 6d78564

Browse files
Merge pull request #462 from microsoft/psl-refactor-email
ci: refactor notification email templates
2 parents 916aeb2 + 88f7857 commit 6d78564

File tree

2 files changed

+119
-247
lines changed

2 files changed

+119
-247
lines changed

.github/workflows/deploy-orchestrator.yml

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

104+
cleanup-deployment:
105+
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
106+
needs: [docker-build, deploy, e2e-test]
107+
uses: ./.github/workflows/job-cleanup-deployment.yml
108+
with:
109+
runner_os: ${{ inputs.runner_os }}
110+
trigger_type: ${{ inputs.trigger_type }}
111+
cleanup_resources: ${{ inputs.cleanup_resources }}
112+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
113+
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
114+
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
115+
AZURE_ENV_OPENAI_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
116+
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
117+
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
118+
secrets: inherit
119+
104120
send-notification:
105121
if: "!cancelled()"
106-
needs: [docker-build, deploy, e2e-test]
122+
needs: [docker-build, deploy, e2e-test, cleanup-deployment]
107123
uses: ./.github/workflows/job-send-notification.yml
108124
with:
109125
trigger_type: ${{ inputs.trigger_type }}
@@ -113,25 +129,10 @@ jobs:
113129
existing_webapp_url: ${{ inputs.existing_webapp_url }}
114130
deploy_result: ${{ needs.deploy.result }}
115131
e2e_test_result: ${{ needs.e2e-test.result }}
132+
cleanup_result: ${{ needs.cleanup-deployment.result }}
116133
CONTAINER_WEB_APPURL: ${{ needs.deploy.outputs.CONTAINER_WEB_APPURL }}
117134
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
118135
QUOTA_FAILED: ${{ needs.deploy.outputs.QUOTA_FAILED }}
119136
TEST_SUCCESS: ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
120137
TEST_REPORT_URL: ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
121138
secrets: inherit
122-
123-
cleanup-deployment:
124-
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
125-
needs: [docker-build, deploy, e2e-test]
126-
uses: ./.github/workflows/job-cleanup-deployment.yml
127-
with:
128-
runner_os: ${{ inputs.runner_os }}
129-
trigger_type: ${{ inputs.trigger_type }}
130-
cleanup_resources: ${{ inputs.cleanup_resources }}
131-
existing_webapp_url: ${{ inputs.existing_webapp_url }}
132-
RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
133-
AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }}
134-
AZURE_ENV_OPENAI_LOCATION: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
135-
ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }}
136-
IMAGE_TAG: ${{ needs.deploy.outputs.IMAGE_TAG }}
137-
secrets: inherit

0 commit comments

Comments
 (0)