Skip to content

Commit 512e24c

Browse files
Merge pull request #828 from microsoft/psl-refactor-email
ci: refactor notification email templates
2 parents ece376f + b7391de commit 512e24c

2 files changed

Lines changed: 153 additions & 254 deletions

File tree

.github/workflows/deploy-orchestrator.yml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,25 @@ jobs:
110110
AZURE_ENV_USE_CASE: ${{ inputs.azure_env_use_case }}
111111
secrets: inherit
112112

113+
cleanup-deployment:
114+
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
115+
needs: [docker-build, deploy, e2e-test]
116+
uses: ./.github/workflows/job-cleanup-resources.yml
117+
with:
118+
runner_os: ${{ inputs.runner_os }}
119+
trigger_type: ${{ inputs.trigger_type }}
120+
cleanup_resources: ${{ inputs.cleanup_resources }}
121+
existing_webapp_url: ${{ inputs.existing_webapp_url }}
122+
resource_group_name: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
123+
azure_location: ${{ needs.deploy.outputs.AZURE_LOCATION }}
124+
azure_env_openai_location: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
125+
env_name: ${{ needs.deploy.outputs.ENV_NAME }}
126+
image_tag: ${{ needs.deploy.outputs.IMAGE_TAG }}
127+
secrets: inherit
128+
113129
send-notification:
114130
if: "!cancelled()"
115-
needs: [docker-build, deploy, e2e-test]
131+
needs: [docker-build, deploy, e2e-test, cleanup-deployment]
116132
uses: ./.github/workflows/job-send-notifications.yml
117133
with:
118134
trigger_type: ${{ inputs.trigger_type }}
@@ -127,20 +143,5 @@ jobs:
127143
quota_failed: ${{ needs.deploy.outputs.QUOTA_FAILED }}
128144
test_success: ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
129145
test_report_url: ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
130-
secrets: inherit
131-
132-
cleanup-deployment:
133-
if: "!cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
134-
needs: [docker-build, deploy, e2e-test]
135-
uses: ./.github/workflows/job-cleanup-resources.yml
136-
with:
137-
runner_os: ${{ inputs.runner_os }}
138-
trigger_type: ${{ inputs.trigger_type }}
139-
cleanup_resources: ${{ inputs.cleanup_resources }}
140-
existing_webapp_url: ${{ inputs.existing_webapp_url }}
141-
resource_group_name: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
142-
azure_location: ${{ needs.deploy.outputs.AZURE_LOCATION }}
143-
azure_env_openai_location: ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
144-
env_name: ${{ needs.deploy.outputs.ENV_NAME }}
145-
image_tag: ${{ needs.deploy.outputs.IMAGE_TAG }}
146+
cleanup_result: ${{ needs.cleanup-deployment.result }}
146147
secrets: inherit

0 commit comments

Comments
 (0)