|
9 | 9 | - hb-psl-update-e2eworkflow |
10 | 10 | schedule: |
11 | 11 | - cron: "0 6 * * *" # Runs at 6:00 AM UTC daily |
| 12 | + workflow_dispatch: |
| 13 | + inputs: |
| 14 | + DEPLOYMENT_TYPE: |
| 15 | + description: 'Specify deployment type: WAF or Non-WAF' |
| 16 | + required: false |
| 17 | + type: choice |
| 18 | + options: |
| 19 | + - WAF |
| 20 | + - Non-WAF |
| 21 | + default: 'Non-WAF' |
12 | 22 |
|
13 | 23 | env: |
14 | 24 | GPT_MIN_CAPACITY: 200 |
|
24 | 34 | DEPLOYMENT_SUCCESS: ${{ steps.deployment_status.outputs.SUCCESS }} |
25 | 35 | AZURE_LOCATION: ${{ steps.set_region.outputs.AZURE_LOCATION }} |
26 | 36 | ENV_NAME: ${{ steps.generate_env_name.outputs.ENV_NAME }} |
| 37 | + DEPLOYMENT_TYPE: ${{ steps.determine_deployment_type.outputs.DEPLOYMENT_TYPE }} |
27 | 38 |
|
28 | 39 | steps: |
29 | 40 | - name: Checkout |
@@ -155,6 +166,15 @@ jobs: |
155 | 166 | # Remove leading zero |
156 | 167 | DAY=$((10#$DAY)) |
157 | 168 | |
| 169 | + # Check if deployment type is provided via workflow dispatch |
| 170 | + if [ "${{ github.event.inputs.DEPLOYMENT_TYPE }}" != "" ]; then |
| 171 | + DEPLOYMENT_TYPE="${{ github.event.inputs.DEPLOYMENT_TYPE }}" |
| 172 | + echo "DEPLOYMENT_TYPE=$DEPLOYMENT_TYPE" >> $GITHUB_OUTPUT |
| 173 | + echo "DEPLOYMENT_TYPE=$DEPLOYMENT_TYPE" >> $GITHUB_ENV |
| 174 | + echo "Deployment type provided via workflow dispatch: $DEPLOYMENT_TYPE" |
| 175 | + exit 0 |
| 176 | + fi |
| 177 | +
|
158 | 178 | # Alternate based on odd/even day |
159 | 179 | if [ $((DAY % 2)) -eq 0 ]; then |
160 | 180 | echo "DEPLOYMENT_TYPE=WAF" >> $GITHUB_OUTPUT |
@@ -337,6 +357,7 @@ jobs: |
337 | 357 | RESOURCE_GROUP_NAME: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }} |
338 | 358 | AZURE_LOCATION: ${{ needs.deploy.outputs.AZURE_LOCATION }} |
339 | 359 | ENV_NAME: ${{ needs.deploy.outputs.ENV_NAME }} |
| 360 | + DEPLOYMENT_TYPE: ${{ needs.deploy.outputs.DEPLOYMENT_TYPE }} |
340 | 361 | steps: |
341 | 362 | - name: Setup Azure CLI |
342 | 363 | run: | |
@@ -387,7 +408,7 @@ jobs: |
387 | 408 | # Construct the email body |
388 | 409 | EMAIL_BODY=$(cat <<EOF |
389 | 410 | { |
390 | | - "body": "<p>Dear Team,</p><p>We would like to inform you that the Build-your-own-copilot-Solution-Accelerator(Client Advisior) Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Build URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>" |
| 411 | + "body": "<p>Dear Team,</p><p>We would like to inform you that the Build-your-own-copilot-Solution-Accelerator(Client Advisior) - ${{ env.DEPLOYMENT_TYPE }} Automation process has encountered an issue and has failed to complete successfully.</p><p><strong>Build URL:</strong> ${RUN_URL}<br> ${OUTPUT}</p><p>Please investigate the matter at your earliest convenience.</p><p>Best regards,<br>Your Automation Team</p>" |
391 | 412 | } |
392 | 413 | EOF |
393 | 414 | ) |
|
0 commit comments