Skip to content

Commit 22aa354

Browse files
Merge pull request #1001 from microsoft/dev-v4
fix: Dev v4 to main PR
2 parents 4623677 + 9f7a2fc commit 22aa354

22 files changed

Lines changed: 855 additions & 229 deletions

.github/workflows/deploy-orchestrator.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
required: true
99
type: string
1010
azure_location:
11-
description: 'Azure Location For Deployment'
11+
description: 'Azure Region (Non-AI Services)'
1212
required: false
1313
default: 'australiaeast'
1414
type: string
@@ -18,22 +18,27 @@ on:
1818
default: ''
1919
type: string
2020
waf_enabled:
21-
description: 'Enable WAF'
21+
description: 'Deploy WAF'
22+
required: false
23+
default: false
24+
type: boolean
25+
enable_scalability:
26+
description: 'Enable Scalability features for WAF deployments (opt-in, defaults to false)'
2227
required: false
2328
default: false
2429
type: boolean
2530
EXP:
26-
description: 'Enable EXP'
31+
description: 'Deploy EXP'
2732
required: false
2833
default: false
2934
type: boolean
3035
build_docker_image:
31-
description: 'Build And Push Docker Image (Optional)'
36+
description: 'Build & Use Custom Images (Optional)'
3237
required: false
3338
default: false
3439
type: boolean
3540
cleanup_resources:
36-
description: 'Cleanup Deployed Resources'
41+
description: 'Auto Delete RG'
3742
required: false
3843
default: false
3944
type: boolean
@@ -43,17 +48,17 @@ on:
4348
default: 'GoldenPath-Testing'
4449
type: string
4550
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
46-
description: 'Log Analytics Workspace ID (Optional)'
51+
description: 'Existing Log Analytics Workspace Resource ID (Optional)'
4752
required: false
4853
default: ''
4954
type: string
5055
AZURE_EXISTING_AIPROJECT_RESOURCE_ID:
51-
description: 'AI Project Resource ID (Optional)'
56+
description: 'Existing AI Project Resource ID (Optional)'
5257
required: false
5358
default: ''
5459
type: string
5560
existing_webapp_url:
56-
description: 'Existing Container WebApp URL (Skips Deployment)'
61+
description: 'Run Tests Against Existing RG (Provide Web App URL)'
5762
required: false
5863
default: ''
5964
type: string
@@ -83,6 +88,7 @@ jobs:
8388
azure_location: ${{ inputs.azure_location }}
8489
resource_group_name: ${{ inputs.resource_group_name }}
8590
waf_enabled: ${{ inputs.waf_enabled }}
91+
enable_scalability: ${{ inputs.enable_scalability }}
8692
EXP: ${{ inputs.EXP }}
8793
build_docker_image: ${{ inputs.build_docker_image }}
8894
existing_webapp_url: ${{ inputs.existing_webapp_url }}

.github/workflows/deploy-v2.yml

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ on:
2424
- 'Local'
2525
default: 'codespace'
2626
azure_location:
27-
description: 'Azure Location For Deployment'
27+
description: 'Azure Region (Non-AI Services)'
2828
required: false
2929
default: 'australiaeast'
3030
type: choice
@@ -43,24 +43,31 @@ on:
4343
default: ''
4444
type: string
4545

46+
build_docker_image:
47+
description: 'Build & Use Custom Images (Optional)'
48+
required: false
49+
default: false
50+
type: boolean
51+
4652
waf_enabled:
47-
description: 'Enable WAF'
53+
description: 'Deploy WAF'
4854
required: false
4955
default: false
5056
type: boolean
5157
EXP:
52-
description: 'Enable EXP'
58+
description: 'Deploy EXP'
5359
required: false
5460
default: false
5561
type: boolean
56-
build_docker_image:
57-
description: 'Build & Push Docker Image (Optional)'
62+
63+
enable_scalability:
64+
description: 'Enable Scalability (WAF only)'
5865
required: false
5966
default: false
6067
type: boolean
6168

6269
cleanup_resources:
63-
description: 'Cleanup Deployed Resources'
70+
description: 'Auto Delete RG'
6471
required: false
6572
default: false
6673
type: boolean
@@ -76,17 +83,17 @@ on:
7683
- 'None'
7784

7885
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
79-
description: 'Log Analytics Workspace ID (Optional)'
86+
description: 'Existing Log Analytics Workspace Resource ID (Optional)'
8087
required: false
8188
default: ''
8289
type: string
8390
AZURE_EXISTING_AIPROJECT_RESOURCE_ID:
84-
description: 'AI Project Resource ID (Optional)'
91+
description: 'Existing AI Project Resource ID (Optional)'
8592
required: false
8693
default: ''
8794
type: string
8895
existing_webapp_url:
89-
description: 'Existing WebApp URL (Skips Deployment)'
96+
description: 'Run Tests Against Existing RG (Provide Web App URL)'
9097
required: false
9198
default: ''
9299
type: string
@@ -103,6 +110,7 @@ jobs:
103110
azure_location: ${{ steps.validate.outputs.azure_location }}
104111
resource_group_name: ${{ steps.validate.outputs.resource_group_name }}
105112
waf_enabled: ${{ steps.validate.outputs.waf_enabled }}
113+
enable_scalability: ${{ steps.validate.outputs.enable_scalability }}
106114
exp: ${{ steps.validate.outputs.exp }}
107115
build_docker_image: ${{ steps.validate.outputs.build_docker_image }}
108116
cleanup_resources: ${{ steps.validate.outputs.cleanup_resources }}
@@ -119,6 +127,7 @@ jobs:
119127
INPUT_AZURE_LOCATION: ${{ github.event.inputs.azure_location }}
120128
INPUT_RESOURCE_GROUP_NAME: ${{ github.event.inputs.resource_group_name }}
121129
INPUT_WAF_ENABLED: ${{ github.event.inputs.waf_enabled }}
130+
INPUT_ENABLE_SCALABILITY: ${{ github.event.inputs.enable_scalability }}
122131
INPUT_EXP: ${{ github.event.inputs.EXP }}
123132
INPUT_BUILD_DOCKER_IMAGE: ${{ github.event.inputs.build_docker_image }}
124133
INPUT_CLEANUP_RESOURCES: ${{ github.event.inputs.cleanup_resources }}
@@ -178,6 +187,15 @@ jobs:
178187
echo "✅ waf_enabled: '$WAF_ENABLED' is valid"
179188
fi
180189
190+
# Validate enable_scalability (boolean, opt-in for WAF deployments)
191+
ENABLE_SCALABILITY="${INPUT_ENABLE_SCALABILITY:-false}"
192+
if [[ "$ENABLE_SCALABILITY" != "true" && "$ENABLE_SCALABILITY" != "false" ]]; then
193+
echo "❌ ERROR: enable_scalability must be 'true' or 'false', got: '$ENABLE_SCALABILITY'"
194+
VALIDATION_FAILED=true
195+
else
196+
echo "✅ enable_scalability: '$ENABLE_SCALABILITY' is valid"
197+
fi
198+
181199
# Validate EXP (boolean)
182200
EXP_ENABLED="${INPUT_EXP:-false}"
183201
if [[ "$EXP_ENABLED" != "true" && "$EXP_ENABLED" != "false" ]]; then
@@ -270,6 +288,7 @@ jobs:
270288
echo "azure_location=$LOCATION" >> $GITHUB_OUTPUT
271289
echo "resource_group_name=$INPUT_RESOURCE_GROUP_NAME" >> $GITHUB_OUTPUT
272290
echo "waf_enabled=$WAF_ENABLED" >> $GITHUB_OUTPUT
291+
echo "enable_scalability=$ENABLE_SCALABILITY" >> $GITHUB_OUTPUT
273292
echo "exp=$EXP_ENABLED" >> $GITHUB_OUTPUT
274293
echo "build_docker_image=$BUILD_DOCKER" >> $GITHUB_OUTPUT
275294
echo "cleanup_resources=$CLEANUP_RESOURCES" >> $GITHUB_OUTPUT
@@ -287,6 +306,7 @@ jobs:
287306
azure_location: ${{ needs.validate-inputs.outputs.azure_location || 'australiaeast' }}
288307
resource_group_name: ${{ needs.validate-inputs.outputs.resource_group_name || '' }}
289308
waf_enabled: ${{ needs.validate-inputs.outputs.waf_enabled == 'true' }}
309+
enable_scalability: ${{ needs.validate-inputs.outputs.enable_scalability == 'true' }}
290310
EXP: ${{ needs.validate-inputs.outputs.exp == 'true' }}
291311
build_docker_image: ${{ needs.validate-inputs.outputs.build_docker_image == 'true' }}
292312
cleanup_resources: ${{ needs.validate-inputs.outputs.cleanup_resources == 'true' }}

.github/workflows/deploy-waf.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,19 @@ jobs:
9494
- name: Check and Create Resource Group
9595
id: check_create_rg
9696
run: |
97-
set -e
98-
echo "Checking if resource group exists..."
97+
set -e
98+
OWNER_TAG_VALUE="${{ github.actor }}"
99+
echo "🔍 Checking if resource group '${{ env.RESOURCE_GROUP_NAME }}' exists..."
99100
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
100101
if [ "$rg_exists" = "false" ]; then
101-
echo "Resource group does not exist. Creating..."
102-
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} || { echo "Error creating resource group"; exit 1; }
102+
echo "📦 Resource group does not exist. Creating new resource group '${{ env.RESOURCE_GROUP_NAME }}' in location '${{ env.AZURE_LOCATION }}'..."
103+
echo "🏷️ Adding Owner tag: Owner=${OWNER_TAG_VALUE}"
104+
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} --tags "Owner=${OWNER_TAG_VALUE}" || { echo "❌ Error creating resource group"; exit 1; }
105+
echo "✅ Resource group '${{ env.RESOURCE_GROUP_NAME }}' created successfully."
103106
else
104-
echo "Resource group already exists."
107+
echo "✅ Resource group '${{ env.RESOURCE_GROUP_NAME }}' already exists."
108+
echo "🏷️ Merging Owner tag on existing resource group: Owner=${OWNER_TAG_VALUE}"
109+
az group update --name "${{ env.RESOURCE_GROUP_NAME }}" --set tags.Owner="${OWNER_TAG_VALUE}" --output none || echo "⚠️ Warning: failed to update Owner tag on existing resource group '${{ env.RESOURCE_GROUP_NAME }}'."
105110
fi
106111
107112
- name: Generate Unique Solution Prefix

.github/workflows/deploy.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,18 @@ jobs:
101101
id: check_create_rg
102102
run: |
103103
set -e
104+
OWNER_TAG_VALUE="${{ github.actor }}"
105+
echo "🔍 Checking if resource group '${{ env.RESOURCE_GROUP_NAME }}' exists..."
104106
rg_exists=$(az group exists --name ${{ env.RESOURCE_GROUP_NAME }})
105107
if [ "$rg_exists" = "false" ]; then
106-
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }}
108+
echo "📦 Resource group does not exist. Creating new resource group '${{ env.RESOURCE_GROUP_NAME }}' in location '${{ env.AZURE_LOCATION }}'..."
109+
echo "🏷️ Adding Owner tag: Owner=${OWNER_TAG_VALUE}"
110+
az group create --name ${{ env.RESOURCE_GROUP_NAME }} --location ${{ env.AZURE_LOCATION }} --tags "Owner=${OWNER_TAG_VALUE}" || { echo "❌ Error creating resource group"; exit 1; }
111+
echo "✅ Resource group '${{ env.RESOURCE_GROUP_NAME }}' created successfully."
112+
else
113+
echo "✅ Resource group '${{ env.RESOURCE_GROUP_NAME }}' already exists. Deploying to existing resource group."
114+
echo "🏷️ Merging Owner tag on existing resource group: Owner=${OWNER_TAG_VALUE}"
115+
az group update --name "${{ env.RESOURCE_GROUP_NAME }}" --set tags.Owner="${OWNER_TAG_VALUE}" --output none || echo "⚠️ Warning: failed to update Owner tag on existing resource group '${{ env.RESOURCE_GROUP_NAME }}'."
107116
fi
108117
echo "RESOURCE_GROUP_NAME=${{ env.RESOURCE_GROUP_NAME }}" >> $GITHUB_OUTPUT
109118

.github/workflows/job-deploy-linux.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ on:
2828
required: false
2929
type: string
3030
default: 'false'
31+
ENABLE_SCALABILITY:
32+
description: 'Enable Scalability features for WAF deployments (opt-in)'
33+
required: false
34+
type: string
35+
default: 'false'
3136
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
3237
required: false
3338
type: string
@@ -192,10 +197,26 @@ jobs:
192197
shell: bash
193198
env:
194199
INPUT_WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
200+
INPUT_ENABLE_SCALABILITY: ${{ inputs.ENABLE_SCALABILITY }}
195201
run: |
202+
set -euo pipefail
196203
if [[ "$INPUT_WAF_ENABLED" == "true" ]]; then
197204
cp infra/main.waf.parameters.json infra/main.parameters.json
198205
echo "✅ Successfully copied WAF parameters to main parameters file"
206+
SCALABILITY_VALUE="${INPUT_ENABLE_SCALABILITY:-false}"
207+
if [[ "$SCALABILITY_VALUE" != "true" && "$SCALABILITY_VALUE" != "false" ]]; then
208+
echo "❌ ERROR: ENABLE_SCALABILITY must be 'true' or 'false', got: '$SCALABILITY_VALUE'"
209+
exit 1
210+
fi
211+
echo "🔧 Setting enableScalability=${SCALABILITY_VALUE}"
212+
tmpfile=$(mktemp)
213+
if ! jq --argjson v "$SCALABILITY_VALUE" '.parameters.enableScalability.value = $v' infra/main.parameters.json > "$tmpfile"; then
214+
echo "❌ ERROR: jq failed to update enableScalability in infra/main.parameters.json"
215+
rm -f "$tmpfile"
216+
exit 1
217+
fi
218+
mv "$tmpfile" infra/main.parameters.json
219+
echo "✅ enableScalability set to ${SCALABILITY_VALUE}"
199220
else
200221
echo "🔧 Configuring Non-WAF deployment - using default main.parameters.json..."
201222
fi

.github/workflows/job-deploy-windows.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ on:
2828
required: false
2929
type: string
3030
default: 'false'
31+
ENABLE_SCALABILITY:
32+
description: 'Enable Scalability features for WAF deployments (opt-in)'
33+
required: false
34+
type: string
35+
default: 'false'
3136
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
3237
required: false
3338
type: string
@@ -191,10 +196,26 @@ jobs:
191196
shell: bash
192197
env:
193198
INPUT_WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
199+
INPUT_ENABLE_SCALABILITY: ${{ inputs.ENABLE_SCALABILITY }}
194200
run: |
201+
set -euo pipefail
195202
if [[ "$INPUT_WAF_ENABLED" == "true" ]]; then
196203
cp infra/main.waf.parameters.json infra/main.parameters.json
197204
echo "✅ Successfully copied WAF parameters to main parameters file"
205+
SCALABILITY_VALUE="${INPUT_ENABLE_SCALABILITY:-false}"
206+
if [[ "$SCALABILITY_VALUE" != "true" && "$SCALABILITY_VALUE" != "false" ]]; then
207+
echo "❌ ERROR: ENABLE_SCALABILITY must be 'true' or 'false', got: '$SCALABILITY_VALUE'"
208+
exit 1
209+
fi
210+
echo "🔧 Setting enableScalability=${SCALABILITY_VALUE}"
211+
tmpfile=$(mktemp)
212+
if ! jq --argjson v "$SCALABILITY_VALUE" '.parameters.enableScalability.value = $v' infra/main.parameters.json > "$tmpfile"; then
213+
echo "❌ ERROR: jq failed to update enableScalability in infra/main.parameters.json"
214+
rm -f "$tmpfile"
215+
exit 1
216+
fi
217+
mv "$tmpfile" infra/main.parameters.json
218+
echo "✅ enableScalability set to ${SCALABILITY_VALUE}"
198219
else
199220
echo "🔧 Configuring Non-WAF deployment - using default main.parameters.json..."
200221
fi

0 commit comments

Comments
 (0)