1212 required : false
1313 default : false
1414 type : boolean
15+ run_e2e_tests :
16+ description : ' Run end-to-end tests'
17+ required : false
18+ default : true
19+ type : boolean
1520 cleanup_resources :
1621 description : ' Cleanup deployed resources'
1722 required : false
1823 default : false
1924 type : boolean
25+
2026
2127env :
2228 GPT_MIN_CAPACITY : 150
2531 WAF_ENABLED : ${{ github.event.inputs.waf_enabled || false }}
2632 EXP : ${{ github.event.inputs.EXP || false }}
2733 CLEANUP_RESOURCES : ${{ github.event.inputs.cleanup_resources || true }}
34+ RUN_E2E_TESTS : ${{ github.event.inputs.run_e2e_tests || true }}
2835
2936jobs :
3037 deploy :
@@ -199,18 +206,6 @@ jobs:
199206 echo "Generated Environment Name: ${UNIQUE_ENV_NAME}"
200207 echo "ENV_NAME=${UNIQUE_ENV_NAME}" >> $GITHUB_OUTPUT
201208
202- - name : Debug - WAF Configuration Decision
203- run : |
204- echo "=== DEBUGGING: WAF Configuration Decision ==="
205- echo "WAF_ENABLED value: '${{ env.WAF_ENABLED }}'"
206- echo "WAF comparison: [[ '${{ env.WAF_ENABLED }}' == 'true' ]]"
207- if [[ "${{ env.WAF_ENABLED }}" == "true" ]]; then
208- echo "✅ DECISION: WAF ENABLED - Will use main.waf.parameters.json"
209- else
210- echo "❌ DECISION: WAF DISABLED - Will use default main.parameters.json"
211- fi
212- echo "=== END DEBUG SECTION ==="
213-
214209 - name : Configure Parameters Based on WAF Setting
215210 run : |
216211 if [[ "${{ env.WAF_ENABLED }}" == "true" ]]; then
@@ -234,7 +229,7 @@ jobs:
234229 echo "Full Image: ${{ secrets.ACR_DEV_LOGIN_SERVER }}/webapp:${{ env.IMAGE_TAG }}"
235230 echo "================================"
236231
237- - name : Deploy using azd up and extract values
232+ - name : Deploy using azd up and extract values (${{ env.WAF_ENABLED == 'true' && 'WAF' || 'Non-WAF' }}+${{ env.EXP == 'true' && 'EXP' || 'Non-EXP' }})
238233 id : get_output
239234 run : |
240235 set -e
@@ -261,26 +256,14 @@ jobs:
261256 azd env set AZURE_ENV_OPENAI_LOCATION="$AZURE_LOCATION"
262257 azd env set AZURE_RESOURCE_GROUP="$RESOURCE_GROUP_NAME"
263258 azd env set AZURE_ENV_IMAGETAG="${{ env.IMAGE_TAG }}"
264-
265- if [[ "${{ env.WAF_ENABLED }}" == "true" ]]; then
266- echo "✅ WAF ENABLED - Will use main.waf.parameters.json"
267- else
268- echo "❌ WAF DISABLED - Will use default main.parameters.json"
269- fi
270259
271- # Debug and Set EXP parameters if enabled
272- echo "=== DEBUGGING: EXP Configuration ==="
273- echo "EXP value: '${{ env.EXP }}'"
274- echo "EXP comparison: [[ '${{ env.EXP }}' == 'true' ]]"
275260 if [[ "${{ env.EXP }}" == "true" ]]; then
276261 echo "✅ EXP ENABLED - Setting EXP parameters..."
277262 azd env set AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID="${{ secrets.EXP_LOG_ANALYTICS_WORKSPACE_ID }}"
278263 azd env set AZURE_EXISTING_AI_PROJECT_RESOURCE_ID="${{ secrets.EXP_AI_PROJECT_RESOURCE_ID }}"
279- echo "✅ EXP parameters configured successfully"
280264 else
281265 echo "❌ EXP DISABLED - Skipping EXP parameters"
282266 fi
283- echo "=== END DEBUG SECTION ==="
284267
285268 # Deploy using azd up
286269 azd up --no-prompt
@@ -362,6 +345,7 @@ jobs:
362345 echo "Logged out from Azure."
363346
364347 e2e-test :
348+ if : github.event.inputs.run_e2e_tests == true || github.event.inputs.run_e2e_tests == null
365349 needs : deploy
366350 uses : ./.github/workflows/test-automation.yml
367351 with :
@@ -370,7 +354,7 @@ jobs:
370354
371355 cleanup-deployment :
372356 if : always() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && (github.event.inputs.cleanup_resources == true || github.event.inputs.cleanup_resources == null)
373- needs : [deploy, e2e-test ]
357+ needs : [deploy]
374358 runs-on : ubuntu-latest
375359 env :
376360 RESOURCE_GROUP_NAME : ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
0 commit comments