@@ -76,10 +76,24 @@ jobs:
7676 TEST_SUITE : ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.run_e2e_tests || 'GoldenPath-Testing' }}
7777 secrets : inherit
7878
79- send-notification :
80- # if: "!cancelled()"
81- if : false # Temporarily disable notification job
79+ cleanup-deployment :
80+ if : " !cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
8281 needs : [deploy, e2e-test]
82+ uses : ./.github/workflows/job-cleanup-deployment.yml
83+ with :
84+ trigger_type : ${{ inputs.trigger_type }}
85+ cleanup_resources : ${{ inputs.cleanup_resources }}
86+ existing_webapp_url : ${{ inputs.existing_webapp_url }}
87+ RESOURCE_GROUP_NAME : ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
88+ AZURE_LOCATION : ${{ needs.deploy.outputs.AZURE_LOCATION }}
89+ AZURE_ENV_OPENAI_LOCATION : ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
90+ ENV_NAME : ${{ needs.deploy.outputs.ENV_NAME }}
91+ IMAGE_TAG : ${{ needs.deploy.outputs.IMAGE_TAG }}
92+ secrets : inherit
93+
94+ send-notification :
95+ if : " !cancelled()"
96+ needs : [deploy, e2e-test, cleanup-deployment]
8397 uses : ./.github/workflows/job-send-notification.yml
8498 with :
8599 trigger_type : ${{ inputs.trigger_type }}
@@ -94,19 +108,5 @@ jobs:
94108 QUOTA_FAILED : ${{ needs.deploy.outputs.QUOTA_FAILED }}
95109 TEST_SUCCESS : ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
96110 TEST_REPORT_URL : ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
97- secrets : inherit
98-
99- cleanup-deployment :
100- if : " !cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
101- needs : [deploy, e2e-test]
102- uses : ./.github/workflows/job-cleanup-deployment.yml
103- with :
104- trigger_type : ${{ inputs.trigger_type }}
105- cleanup_resources : ${{ inputs.cleanup_resources }}
106- existing_webapp_url : ${{ inputs.existing_webapp_url }}
107- RESOURCE_GROUP_NAME : ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
108- AZURE_LOCATION : ${{ needs.deploy.outputs.AZURE_LOCATION }}
109- AZURE_ENV_OPENAI_LOCATION : ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
110- ENV_NAME : ${{ needs.deploy.outputs.ENV_NAME }}
111- IMAGE_TAG : ${{ needs.deploy.outputs.IMAGE_TAG }}
111+ cleanup_result : ${{ needs.cleanup-deployment.result }}
112112 secrets : inherit
0 commit comments