44 workflow_call :
55 inputs :
66 runner_os :
7- description : ' Runner OS (ubuntu-latest, windows-latest, or devcontainer )'
7+ description : ' Runner OS (ubuntu-latest or windows-latest)'
88 required : true
99 type : string
1010 azure_location :
4242 required : false
4343 default : ' GoldenPath-Testing'
4444 type : string
45- AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID :
45+ AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID :
4646 description : ' Log Analytics Workspace ID (Optional)'
4747 required : false
4848 default : ' '
4949 type : string
50- AZURE_EXISTING_AI_PROJECT_RESOURCE_ID :
50+ AZURE_EXISTING_AIPROJECT_RESOURCE_ID :
5151 description : ' AI Project Resource ID (Optional)'
5252 required : false
5353 default : ' '
6161 description : ' Trigger type (workflow_dispatch, pull_request, schedule)'
6262 required : true
6363 type : string
64- image_model_choice :
65- description : ' Image model to deploy (gpt-image-1, gpt-image-1.5, none)'
64+ AZURE_ENV_IMAGE_MODEL_NAME :
65+ description : ' Image model to deploy (gpt-image-1-mini , gpt-image-1.5, none)'
6666 required : false
67- default : ' gpt-image-1'
67+ default : ' gpt-image-1-mini '
6868 type : string
6969
7070env :
7171 AZURE_DEV_COLLECT_TELEMETRY : ${{ vars.AZURE_DEV_COLLECT_TELEMETRY }}
72- permissions :
73- contents : read
74- actions : read
75- packages : write # Required by job-deploy → job-deploy-devcontainer to push devcontainer image to GHCR
76-
72+
7773jobs :
7874 docker-build :
7975 uses : ./.github/workflows/job-docker-build.yml
@@ -95,27 +91,42 @@ jobs:
9591 EXP : ${{ inputs.EXP }}
9692 build_docker_image : ${{ inputs.build_docker_image }}
9793 existing_webapp_url : ${{ inputs.existing_webapp_url }}
98- AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID : ${{ inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID }}
99- AZURE_EXISTING_AI_PROJECT_RESOURCE_ID : ${{ inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID }}
100- docker_image_tag : ${{ needs.docker-build.outputs.IMAGE_TAG }}
94+ AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID : ${{ inputs.AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID }}
95+ AZURE_EXISTING_AIPROJECT_RESOURCE_ID : ${{ inputs.AZURE_EXISTING_AIPROJECT_RESOURCE_ID }}
96+ docker_image_tag : ${{ needs.docker-build.outputs.AZURE_ENV_IMAGE_TAG }}
10197 run_e2e_tests : ${{ inputs.run_e2e_tests }}
10298 cleanup_resources : ${{ inputs.cleanup_resources }}
103- image_model_choice : ${{ inputs.image_model_choice }}
99+ AZURE_ENV_IMAGE_MODEL_NAME : ${{ inputs.AZURE_ENV_IMAGE_MODEL_NAME }}
104100 secrets : inherit
105101
106102 e2e-test :
107- # if: "!cancelled() && ((needs.deploy.result == 'success' && needs.deploy.outputs.WEB_APPURL != '') || (inputs.existing_webapp_url != '' && inputs.existing_webapp_url != null)) && (inputs.trigger_type != 'workflow_dispatch' || (inputs.run_e2e_tests != 'None' && inputs.run_e2e_tests != '' && inputs.run_e2e_tests != null))"
108- if : false # Temporarily disable E2E tests
103+ if : " !cancelled() && ((needs.deploy.result == 'success' && needs.deploy.outputs.WEB_APPURL != '') || (inputs.existing_webapp_url != '' && inputs.existing_webapp_url != null)) && (inputs.trigger_type != 'workflow_dispatch' || (inputs.run_e2e_tests != 'None' && inputs.run_e2e_tests != '' && inputs.run_e2e_tests != null))"
109104 needs : [docker-build, deploy]
110105 uses : ./.github/workflows/test-automation-v2.yml
111106 with :
112107 DOCGEN_URL : ${{ needs.deploy.outputs.WEB_APPURL || inputs.existing_webapp_url }}
113108 TEST_SUITE : ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.run_e2e_tests || 'GoldenPath-Testing' }}
114109 secrets : inherit
115110
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_AI_SERVICE_LOCATION : ${{ needs.deploy.outputs.AZURE_ENV_AI_SERVICE_LOCATION }}
123+ ENV_NAME : ${{ needs.deploy.outputs.ENV_NAME }}
124+ AZURE_ENV_IMAGE_TAG : ${{ needs.deploy.outputs.AZURE_ENV_IMAGE_TAG }}
125+ secrets : inherit
126+
116127 send-notification :
117128 if : " !cancelled()"
118- needs : [docker-build, deploy, e2e-test]
129+ needs : [docker-build, deploy, e2e-test, cleanup-deployment ]
119130 uses : ./.github/workflows/job-send-notification.yml
120131 with :
121132 trigger_type : ${{ inputs.trigger_type }}
@@ -130,20 +141,5 @@ jobs:
130141 QUOTA_FAILED : ${{ needs.deploy.outputs.QUOTA_FAILED }}
131142 TEST_SUCCESS : ${{ needs.e2e-test.outputs.TEST_SUCCESS }}
132143 TEST_REPORT_URL : ${{ needs.e2e-test.outputs.TEST_REPORT_URL }}
133- secrets : inherit
134-
135- cleanup-deployment :
136- if : " !cancelled() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && inputs.existing_webapp_url == '' && (inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources)"
137- needs : [docker-build, deploy, e2e-test]
138- uses : ./.github/workflows/job-cleanup-deployment.yml
139- with :
140- runner_os : ${{ inputs.runner_os }}
141- trigger_type : ${{ inputs.trigger_type }}
142- cleanup_resources : ${{ inputs.cleanup_resources }}
143- existing_webapp_url : ${{ inputs.existing_webapp_url }}
144- RESOURCE_GROUP_NAME : ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
145- AZURE_LOCATION : ${{ needs.deploy.outputs.AZURE_LOCATION }}
146- AZURE_ENV_OPENAI_LOCATION : ${{ needs.deploy.outputs.AZURE_ENV_OPENAI_LOCATION }}
147- ENV_NAME : ${{ needs.deploy.outputs.ENV_NAME }}
148- IMAGE_TAG : ${{ needs.deploy.outputs.IMAGE_TAG }}
144+ cleanup_result : ${{ needs.cleanup-deployment.result }}
149145 secrets : inherit
0 commit comments