|
1 | | -name: Deploy-Test-Cleanup (Unified) |
| 1 | +name: Deploy-Test-Cleanup (Parameterized) |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
5 | 5 | branches: |
6 | 6 | - deploy-azd-waf |
7 | | - workflow_run: |
8 | | - workflows: ["Build Docker and Optional Push - Client Advisor"] |
9 | | - types: |
10 | | - - completed |
11 | | - branches: |
12 | | - - main |
13 | | - - hotfix |
14 | | - - dev |
15 | | - - demo |
16 | 7 | workflow_dispatch: |
17 | 8 | inputs: |
18 | 9 | waf_enabled: |
19 | 10 | description: 'Enable WAF (Well-Architected Framework) deployment' |
20 | 11 | required: false |
21 | | - default: 'false' |
22 | | - type: choice |
23 | | - options: |
24 | | - - 'true' |
25 | | - - 'false' |
| 12 | + default: false |
| 13 | + type: boolean |
26 | 14 | EXP: |
27 | | - description: 'Enable EXP features' |
| 15 | + description: 'Enable EXP' |
28 | 16 | required: false |
29 | | - default: 'false' |
30 | | - type: choice |
31 | | - options: |
32 | | - - 'true' |
33 | | - - 'false' |
| 17 | + default: false |
| 18 | + type: boolean |
34 | 19 | cleanup_resources: |
35 | 20 | description: 'Cleanup deployed resources after testing' |
36 | 21 | required: false |
37 | | - default: 'true' |
38 | | - type: choice |
39 | | - options: |
40 | | - - 'true' |
41 | | - - 'false' |
| 22 | + default: true |
| 23 | + type: boolean |
42 | 24 | schedule: |
43 | 25 | - cron: "0 6,18 * * *" # Runs at 6:00 AM and 6:00 PM GMT |
44 | 26 |
|
45 | 27 | env: |
46 | 28 | GPT_MIN_CAPACITY: 150 |
47 | 29 | TEXT_EMBEDDING_MIN_CAPACITY: 80 |
48 | 30 | BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.head_ref || github.ref_name }} |
49 | | - WAF_ENABLED: ${{ github.event.inputs.waf_enabled || 'false' }} |
50 | | - EXP: ${{ github.event.inputs.EXP || 'false' }} |
51 | | - CLEANUP_RESOURCES: ${{ github.event.inputs.cleanup_resources || 'true' }} |
| 31 | + WAF_ENABLED: ${{ github.event.inputs.waf_enabled || false }} |
| 32 | + EXP: ${{ github.event.inputs.EXP || false }} |
| 33 | + CLEANUP_RESOURCES: ${{ github.event.inputs.cleanup_resources || true }} |
52 | 34 |
|
53 | 35 | jobs: |
54 | 36 | deploy: |
|
59 | 41 | ENV_NAME: ${{ steps.generate_env_name.outputs.ENV_NAME }} |
60 | 42 | AZURE_LOCATION: ${{ steps.set_region.outputs.AZURE_LOCATION }} |
61 | 43 | env: |
62 | | - WAF_ENABLED: ${{ github.event.inputs.waf_enabled || 'true' }} |
63 | | - EXP: ${{ github.event.inputs.EXP || 'false' }} |
64 | | - CLEANUP_RESOURCES: ${{ github.event.inputs.cleanup_resources || 'true' }} |
| 44 | + WAF_ENABLED: ${{ github.event.inputs.waf_enabled || true }} |
| 45 | + EXP: ${{ github.event.inputs.EXP || false }} |
| 46 | + CLEANUP_RESOURCES: ${{ github.event.inputs.cleanup_resources || true }} |
65 | 47 |
|
66 | 48 | steps: |
67 | 49 | - name: Checkout Code |
@@ -335,7 +317,7 @@ jobs: |
335 | 317 | secrets: inherit |
336 | 318 |
|
337 | 319 | cleanup-deployment: |
338 | | - if: always() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && (github.event.inputs.cleanup_resources == 'true' || github.event.inputs.cleanup_resources == null) |
| 320 | + if: always() && needs.deploy.outputs.RESOURCE_GROUP_NAME != '' && (github.event.inputs.cleanup_resources == true || github.event.inputs.cleanup_resources == null) |
339 | 321 | needs: [deploy, e2e-test] |
340 | 322 | runs-on: ubuntu-latest |
341 | 323 | env: |
@@ -385,9 +367,9 @@ jobs: |
385 | 367 | RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" |
386 | 368 | |
387 | 369 | # Get deployment configuration for notification |
388 | | - WAF_STATUS="${{ github.event.inputs.waf_enabled || 'true' }}" |
389 | | - EXP_STATUS="${{ github.event.inputs.EXP || 'false' }}" |
390 | | - CLEANUP_STATUS="${{ github.event.inputs.cleanup_resources || 'true' }}" |
| 370 | + WAF_STATUS="${{ github.event.inputs.waf_enabled || true }}" |
| 371 | + EXP_STATUS="${{ github.event.inputs.EXP || false }}" |
| 372 | + CLEANUP_STATUS="${{ github.event.inputs.cleanup_resources || true }}" |
391 | 373 |
|
392 | 374 | # Construct the email body |
393 | 375 | EMAIL_BODY=$(cat <<EOF |
|
0 commit comments