|
54 | 54 | default: false |
55 | 55 | type: boolean |
56 | 56 | schedule: |
57 | | - - cron: "0 6,18 * * *" # Runs at 6:00 AM and 6:00 PM GMT |
58 | | - |
59 | | - |
60 | | - |
| 57 | + - cron: '0 9,21 * * *' # Runs at 9:00 AM and 9:00 PM GMT |
61 | 58 | env: |
62 | 59 | GPT_MIN_CAPACITY: 150 |
63 | 60 | TEXT_EMBEDDING_MIN_CAPACITY: 80 |
@@ -139,8 +136,6 @@ jobs: |
139 | 136 | fi |
140 | 137 | fi |
141 | 138 | |
142 | | - echo "✅ EXP configuration is valid" |
143 | | - |
144 | 139 | - name: Checkout Code |
145 | 140 | uses: actions/checkout@v4 |
146 | 141 |
|
@@ -321,12 +316,6 @@ jobs: |
321 | 316 | echo "Image tag: ${{ env.IMAGE_TAG }}" |
322 | 317 | echo "Run number: ${{ github.run_number }}" |
323 | 318 |
|
324 | | - - name: Verify Docker Image Selection |
325 | | - if: env.BUILD_DOCKER_IMAGE == 'false' |
326 | | - run: | |
327 | | - echo "✅ Using existing Docker image: latest_waf" |
328 | | - echo "Image tag: ${{ env.IMAGE_TAG }}" |
329 | | -
|
330 | 319 | - name: Generate Unique Environment Name |
331 | 320 | id: generate_env_name |
332 | 321 | run: | |
@@ -361,7 +350,7 @@ jobs: |
361 | 350 | echo "Full Image: ${{ secrets.ACR_TEST_LOGIN_SERVER }}/webapp:${{ env.IMAGE_TAG }}" |
362 | 351 | echo "================================" |
363 | 352 |
|
364 | | - - name: Deploy using azd up and extract values (${{ env.WAF_ENABLED == 'true' && 'WAF' || 'Non-WAF' }}+${{ env.EXP == 'true' && 'EXP' || 'Non-EXP' }}) |
| 353 | + - name: Deploy using azd up and extract values (${{ github.event.inputs.waf_enabled == 'true' && 'WAF' || 'Non-WAF' }}+${{ (github.event.inputs.EXP == 'true' || github.event.inputs.AZURE_ENV_LOG_ANALYTICS_WORKSPACE_ID != '' || github.event.inputs.AZURE_EXISTING_AI_PROJECT_RESOURCE_ID != '') && 'EXP' || 'Non-EXP' }}) |
365 | 354 | id: get_output |
366 | 355 | run: | |
367 | 356 | set -e |
@@ -507,17 +496,20 @@ jobs: |
507 | 496 | echo "Logged out from Azure." |
508 | 497 |
|
509 | 498 | e2e-test: |
510 | | - # Run e2e tests for automatic triggers, when manually enabled, or when existing webapp URL is provided |
511 | | - if: always() && (github.event_name != 'workflow_dispatch' || github.event.inputs.run_e2e_tests == 'true' || github.event.inputs.run_e2e_tests == null || github.event.inputs.existing_webapp_url != '') |
| 499 | + # Run e2e tests only when deploy succeeds or when using existing webapp URL |
| 500 | + # Skip if deploy job failed (for both automatic and manual triggers) |
| 501 | + # Respect the run_e2e_tests checkbox - skip if explicitly unchecked |
| 502 | + if: (needs.deploy.result == 'success' || github.event.inputs.existing_webapp_url != '') && (github.event_name != 'workflow_dispatch' || github.event.inputs.run_e2e_tests == 'true' || github.event.inputs.run_e2e_tests == null) |
512 | 503 | needs: [deploy] |
513 | 504 | uses: ./.github/workflows/test-automation.yml |
514 | 505 | with: |
515 | 506 | DOCGEN_URL: ${{ github.event.inputs.existing_webapp_url || needs.deploy.outputs.WEBAPP_URL }} |
516 | 507 | secrets: inherit |
517 | 508 |
|
518 | 509 | cleanup-deployment: |
519 | | - # Cleanup for automatic triggers or when manually enabled (skip cleanup when using existing webapp URL) |
520 | | - if: always() && needs.deploy.result != 'skipped' && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && (github.event_name != 'workflow_dispatch' || (github.event.inputs.cleanup_resources == 'true' && github.event.inputs.existing_webapp_url == '')) |
| 510 | + # Cleanup when deploy succeeded and cleanup is not explicitly disabled |
| 511 | + # Skip if webapp URL is provided (no resources to cleanup) or cleanup checkbox is unchecked |
| 512 | + if: needs.deploy.result == 'success' && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && github.event.inputs.existing_webapp_url == '' && (github.event_name != 'workflow_dispatch' || github.event.inputs.cleanup_resources == 'true' || github.event.inputs.cleanup_resources == null) |
521 | 513 | needs: [deploy] |
522 | 514 | runs-on: ubuntu-latest |
523 | 515 | env: |
@@ -549,6 +541,7 @@ jobs: |
549 | 541 | az login --service-principal -u ${{ secrets.AZURE_CLIENT_ID }} -p ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }} |
550 | 542 |
|
551 | 543 | - name: Delete Docker Images from ACR |
| 544 | + if: github.event.inputs.existing_webapp_url == '' |
552 | 545 | run: | |
553 | 546 | set -e |
554 | 547 | echo "🗑️ Cleaning up Docker images from Azure Container Registry..." |
|
0 commit comments