Skip to content

Commit 94ef846

Browse files
fix: Fix SFI issues and update Foundry Roles naming
2 parents c2957eb + 3fc9d88 commit 94ef846

13 files changed

Lines changed: 2279 additions & 452 deletions

.github/workflows/deploy-orchestrator.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ on:
2222
required: false
2323
default: false
2424
type: boolean
25+
enable_scalability:
26+
description: 'Enable Scalability (WAF deployments only; opt-in)'
27+
required: false
28+
default: false
29+
type: boolean
2530
EXP:
2631
description: 'Enable EXP'
2732
required: false
@@ -88,6 +93,7 @@ jobs:
8893
azure_location: ${{ inputs.azure_location }}
8994
resource_group_name: ${{ inputs.resource_group_name }}
9095
waf_enabled: ${{ inputs.waf_enabled }}
96+
enable_scalability: ${{ inputs.enable_scalability }}
9197
EXP: ${{ inputs.EXP }}
9298
build_docker_image: ${{ inputs.build_docker_image }}
9399
existing_webapp_url: ${{ inputs.existing_webapp_url }}

.github/workflows/deploy-v2.yml

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ on:
3333
default: 'codespace'
3434

3535
azure_location:
36-
description: 'Azure Location For Deployment'
36+
description: 'Azure Region (Non-AI Services)'
3737
required: false
3838
default: 'australiaeast'
3939
type: choice
@@ -42,6 +42,7 @@ on:
4242
- 'centralus'
4343
- 'eastasia'
4444
- 'eastus'
45+
- 'eastus2'
4546
- 'japaneast'
4647
- 'northeurope'
4748
- 'southeastasia'
@@ -54,25 +55,32 @@ on:
5455
required: false
5556
default: ''
5657
type: string
58+
59+
build_docker_image:
60+
description: 'Build & Use Custom Images (Optional)'
61+
required: false
62+
default: false
63+
type: boolean
5764

5865
waf_enabled:
59-
description: 'Enable WAF'
66+
description: 'Deploy WAF'
6067
required: false
6168
default: false
6269
type: boolean
6370
EXP:
64-
description: 'Enable EXP'
71+
description: 'Deploy EXP'
6572
required: false
6673
default: false
6774
type: boolean
68-
build_docker_image:
69-
description: 'Build And Push Docker Image (Optional)'
75+
76+
enable_scalability:
77+
description: 'Enable Scalability (WAF only)'
7078
required: false
7179
default: false
7280
type: boolean
7381

7482
cleanup_resources:
75-
description: 'Cleanup Deployed Resources'
83+
description: 'Auto Delete RG'
7684
required: false
7785
default: false
7886
type: boolean
@@ -88,17 +96,17 @@ on:
8896
- 'None'
8997

9098
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
91-
description: 'Log Analytics Workspace ID (Optional)'
99+
description: 'Existing Log Analytics Workspace Resource ID (Optional)'
92100
required: false
93101
default: ''
94102
type: string
95103
AZURE_EXISTING_AIPROJECT_RESOURCE_ID:
96-
description: 'AI Project Resource ID (Optional)'
104+
description: 'Existing AI Project Resource ID (Optional)'
97105
required: false
98106
default: ''
99107
type: string
100108
existing_webapp_url:
101-
description: 'Existing WebApp URL (Skips Deployment)'
109+
description: 'Run Tests Against Existing RG (Provide Web App URL)'
102110
required: false
103111
default: ''
104112
type: string
@@ -128,6 +136,7 @@ jobs:
128136
azure_location: ${{ steps.validate.outputs.azure_location }}
129137
resource_group_name: ${{ steps.validate.outputs.resource_group_name }}
130138
waf_enabled: ${{ steps.validate.outputs.waf_enabled }}
139+
enable_scalability: ${{ steps.validate.outputs.enable_scalability }}
131140
exp: ${{ steps.validate.outputs.exp }}
132141
build_docker_image: ${{ steps.validate.outputs.build_docker_image }}
133142
cleanup_resources: ${{ steps.validate.outputs.cleanup_resources }}
@@ -145,6 +154,7 @@ jobs:
145154
INPUT_AZURE_LOCATION: ${{ github.event.inputs.azure_location }}
146155
INPUT_RESOURCE_GROUP_NAME: ${{ github.event.inputs.resource_group_name }}
147156
INPUT_WAF_ENABLED: ${{ github.event.inputs.waf_enabled }}
157+
INPUT_ENABLE_SCALABILITY: ${{ github.event.inputs.enable_scalability }}
148158
INPUT_EXP: ${{ github.event.inputs.EXP }}
149159
INPUT_BUILD_DOCKER_IMAGE: ${{ github.event.inputs.build_docker_image }}
150160
INPUT_CLEANUP_RESOURCES: ${{ github.event.inputs.cleanup_resources }}
@@ -208,6 +218,18 @@ jobs:
208218
echo "✅ waf_enabled: '$WAF_ENABLED' is valid"
209219
fi
210220
221+
# Validate enable_scalability (boolean, defaults to false; only meaningful when waf_enabled=true)
222+
ENABLE_SCALABILITY="${INPUT_ENABLE_SCALABILITY:-false}"
223+
if [[ "$ENABLE_SCALABILITY" != "true" && "$ENABLE_SCALABILITY" != "false" ]]; then
224+
echo "❌ ERROR: enable_scalability must be 'true' or 'false', got: '$ENABLE_SCALABILITY'"
225+
VALIDATION_FAILED=true
226+
else
227+
echo "✅ enable_scalability: '$ENABLE_SCALABILITY' is valid"
228+
fi
229+
if [[ "$ENABLE_SCALABILITY" == "true" && "$WAF_ENABLED" != "true" ]]; then
230+
echo "ℹ️ Note: enable_scalability=true is only applied when waf_enabled=true; it will be ignored for non-WAF deployments."
231+
fi
232+
211233
# Validate EXP (boolean)
212234
EXP_ENABLED="${INPUT_EXP:-false}"
213235
if [[ "$EXP_ENABLED" != "true" && "$EXP_ENABLED" != "false" ]]; then
@@ -300,6 +322,7 @@ jobs:
300322
echo "azure_location=$LOCATION" >> $GITHUB_OUTPUT
301323
echo "resource_group_name=$INPUT_RESOURCE_GROUP_NAME" >> $GITHUB_OUTPUT
302324
echo "waf_enabled=$WAF_ENABLED" >> $GITHUB_OUTPUT
325+
echo "enable_scalability=$ENABLE_SCALABILITY" >> $GITHUB_OUTPUT
303326
echo "exp=$EXP_ENABLED" >> $GITHUB_OUTPUT
304327
echo "build_docker_image=$BUILD_DOCKER" >> $GITHUB_OUTPUT
305328
echo "cleanup_resources=$CLEANUP_RESOURCES" >> $GITHUB_OUTPUT
@@ -327,6 +350,7 @@ jobs:
327350
azure_location: ${{ needs.validate-inputs.outputs.azure_location || 'australiaeast' }}
328351
resource_group_name: ${{ needs.validate-inputs.outputs.resource_group_name || '' }}
329352
waf_enabled: ${{ needs.validate-inputs.outputs.waf_enabled == 'true' }}
353+
enable_scalability: ${{ needs.validate-inputs.outputs.enable_scalability == 'true' }}
330354
EXP: ${{ needs.validate-inputs.outputs.exp == 'true' }}
331355
build_docker_image: ${{ needs.validate-inputs.outputs.build_docker_image == 'true' }}
332356
cleanup_resources: ${{ needs.validate-inputs.outputs.cleanup_resources == 'true' }}

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

Lines changed: 23 additions & 2 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 (applied only when WAF_ENABLED=true)'
33+
required: false
34+
type: string
35+
default: 'false'
3136
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
3237
required: false
3338
type: string
@@ -186,11 +191,27 @@ jobs:
186191
- name: Configure Parameters Based on WAF Setting
187192
shell: bash
188193
env:
189-
WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
194+
INPUT_WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
195+
INPUT_ENABLE_SCALABILITY: ${{ inputs.ENABLE_SCALABILITY }}
190196
run: |
191-
if [[ "$WAF_ENABLED" == "true" ]]; then
197+
set -euo pipefail
198+
if [[ "$INPUT_WAF_ENABLED" == "true" ]]; then
192199
cp infra/main.waf.parameters.json infra/main.parameters.json
193200
echo "✅ Successfully copied WAF parameters to main parameters file"
201+
SCALABILITY_VALUE="${INPUT_ENABLE_SCALABILITY:-false}"
202+
if [[ "$SCALABILITY_VALUE" != "true" && "$SCALABILITY_VALUE" != "false" ]]; then
203+
echo "❌ ERROR: ENABLE_SCALABILITY must be 'true' or 'false', got: '$SCALABILITY_VALUE'"
204+
exit 1
205+
fi
206+
echo "🔧 Setting enableScalability=${SCALABILITY_VALUE}"
207+
tmpfile=$(mktemp)
208+
if ! jq --argjson v "$SCALABILITY_VALUE" '.parameters.enableScalability.value = $v' infra/main.parameters.json > "$tmpfile"; then
209+
echo "❌ ERROR: jq failed to update enableScalability in infra/main.parameters.json"
210+
rm -f "$tmpfile"
211+
exit 1
212+
fi
213+
mv "$tmpfile" infra/main.parameters.json
214+
echo "✅ enableScalability set to ${SCALABILITY_VALUE}"
194215
else
195216
echo "🔧 Configuring Non-WAF deployment - using default main.parameters.json..."
196217
fi

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

Lines changed: 23 additions & 2 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 (applied only when WAF_ENABLED=true)'
33+
required: false
34+
type: string
35+
default: 'false'
3136
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID:
3237
required: false
3338
type: string
@@ -188,11 +193,27 @@ jobs:
188193
- name: Configure Parameters Based on WAF Setting
189194
shell: bash
190195
env:
191-
WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
196+
INPUT_WAF_ENABLED: ${{ inputs.WAF_ENABLED }}
197+
INPUT_ENABLE_SCALABILITY: ${{ inputs.ENABLE_SCALABILITY }}
192198
run: |
193-
if [[ "$WAF_ENABLED" == "true" ]]; then
199+
set -euo pipefail
200+
if [[ "$INPUT_WAF_ENABLED" == "true" ]]; then
194201
cp infra/main.waf.parameters.json infra/main.parameters.json
195202
echo "✅ Successfully copied WAF parameters to main parameters file"
203+
SCALABILITY_VALUE="${INPUT_ENABLE_SCALABILITY:-false}"
204+
if [[ "$SCALABILITY_VALUE" != "true" && "$SCALABILITY_VALUE" != "false" ]]; then
205+
echo "❌ ERROR: ENABLE_SCALABILITY must be 'true' or 'false', got: '$SCALABILITY_VALUE'"
206+
exit 1
207+
fi
208+
echo "🔧 Setting enableScalability=${SCALABILITY_VALUE}"
209+
tmpfile=$(mktemp)
210+
if ! jq --argjson v "$SCALABILITY_VALUE" '.parameters.enableScalability.value = $v' infra/main.parameters.json > "$tmpfile"; then
211+
echo "❌ ERROR: jq failed to update enableScalability in infra/main.parameters.json"
212+
rm -f "$tmpfile"
213+
exit 1
214+
fi
215+
mv "$tmpfile" infra/main.parameters.json
216+
echo "✅ enableScalability set to ${SCALABILITY_VALUE}"
196217
else
197218
echo "🔧 Configuring Non-WAF deployment - using default main.parameters.json..."
198219
fi

.github/workflows/job-deploy.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ on:
2626
required: false
2727
default: false
2828
type: boolean
29+
enable_scalability:
30+
description: 'Enable Scalability (WAF deployments only; opt-in)'
31+
required: false
32+
default: false
33+
type: boolean
2934
EXP:
3035
description: 'Enable EXP'
3136
required: false
@@ -99,6 +104,7 @@ env:
99104
IMAGE_MODEL_MIN_CAPACITY: 1
100105
BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.head_ref || github.ref_name }}
101106
WAF_ENABLED: ${{ inputs.trigger_type == 'workflow_dispatch' && (inputs.waf_enabled || false) || false }}
107+
ENABLE_SCALABILITY: ${{ inputs.trigger_type == 'workflow_dispatch' && inputs.waf_enabled && (inputs.enable_scalability || false) || false }}
102108
EXP: ${{ inputs.trigger_type == 'workflow_dispatch' && (inputs.EXP || false) || false }}
103109
CLEANUP_RESOURCES: ${{ inputs.trigger_type != 'workflow_dispatch' || inputs.cleanup_resources }}
104110
RUN_E2E_TESTS: ${{ inputs.trigger_type == 'workflow_dispatch' && (inputs.run_e2e_tests || 'GoldenPath-Testing') || 'GoldenPath-Testing' }}
@@ -528,15 +534,19 @@ jobs:
528534
id: check_create_rg
529535
shell: bash
530536
run: |
531-
set -e
537+
set -e
538+
OWNER_TAG_VALUE="${{ github.actor }}"
532539
echo "🔍 Checking if resource group '$RESOURCE_GROUP_NAME' exists..."
533540
rg_exists=$(az group exists --name $RESOURCE_GROUP_NAME)
534541
if [ "$rg_exists" = "false" ]; then
535542
echo "📦 Resource group does not exist. Creating new resource group '$RESOURCE_GROUP_NAME' in location '$AZURE_LOCATION'..."
536-
az group create --name $RESOURCE_GROUP_NAME --location $AZURE_LOCATION --tags ${{ env.RG_TAGS }} || { echo "❌ Error creating resource group"; exit 1; }
543+
echo "🏷️ Adding Owner tag: Owner=${OWNER_TAG_VALUE}"
544+
az group create --name $RESOURCE_GROUP_NAME --location $AZURE_LOCATION --tags ${{ env.RG_TAGS }} "Owner=${OWNER_TAG_VALUE}" || { echo "❌ Error creating resource group"; exit 1; }
537545
echo "✅ Resource group '$RESOURCE_GROUP_NAME' created successfully."
538546
else
539547
echo "✅ Resource group '$RESOURCE_GROUP_NAME' already exists. Deploying to existing resource group."
548+
echo "🏷️ Merging Owner tag on existing resource group: Owner=${OWNER_TAG_VALUE}"
549+
az group update --name "$RESOURCE_GROUP_NAME" --set tags.Owner="${OWNER_TAG_VALUE}" --output none || echo "⚠️ Warning: failed to update Owner tag on existing resource group '$RESOURCE_GROUP_NAME'."
540550
fi
541551
echo "RESOURCE_GROUP_NAME=$RESOURCE_GROUP_NAME" >> $GITHUB_OUTPUT
542552
echo "RESOURCE_GROUP_NAME=$RESOURCE_GROUP_NAME" >> $GITHUB_ENV
@@ -616,6 +626,7 @@ jobs:
616626
echo "|---------------|-------|" >> $GITHUB_STEP_SUMMARY
617627
echo "| **Branch** | \`${{ env.BRANCH_NAME }}\` |" >> $GITHUB_STEP_SUMMARY
618628
echo "| **WAF Enabled** | ${{ env.WAF_ENABLED == 'true' && '✅ Yes' || '❌ No' }} |" >> $GITHUB_STEP_SUMMARY
629+
echo "| **Enable Scalability** | ${{ env.ENABLE_SCALABILITY == 'true' && '✅ Yes' || '❌ No' }} |" >> $GITHUB_STEP_SUMMARY
619630
echo "| **EXP Enabled** | ${{ steps.configure_exp.outputs.EXP_ENABLED == 'true' && '✅ Yes' || '❌ No' }} |" >> $GITHUB_STEP_SUMMARY
620631
echo "| **Run E2E Tests** | \`${{ env.RUN_E2E_TESTS }}\` |" >> $GITHUB_STEP_SUMMARY
621632
echo "| **Cleanup Resources** | ${{ env.CLEANUP_RESOURCES == 'true' && '✅ Yes' || '❌ No' }} |" >> $GITHUB_STEP_SUMMARY
@@ -653,6 +664,7 @@ jobs:
653664
BUILD_DOCKER_IMAGE: ${{ inputs.build_docker_image || 'false' }}
654665
EXP: ${{ needs.azure-setup.outputs.EXP_ENABLED }}
655666
WAF_ENABLED: ${{ inputs.waf_enabled == true && 'true' || 'false' }}
667+
ENABLE_SCALABILITY: ${{ inputs.enable_scalability == true && 'true' || 'false' }}
656668
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID: ${{ inputs.AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID }}
657669
AZURE_EXISTING_AIPROJECT_RESOURCE_ID: ${{ inputs.AZURE_EXISTING_AIPROJECT_RESOURCE_ID }}
658670
secrets: inherit
@@ -671,6 +683,7 @@ jobs:
671683
BUILD_DOCKER_IMAGE: ${{ inputs.build_docker_image || 'false' }}
672684
EXP: ${{ needs.azure-setup.outputs.EXP_ENABLED }}
673685
WAF_ENABLED: ${{ inputs.waf_enabled == true && 'true' || 'false' }}
686+
ENABLE_SCALABILITY: ${{ inputs.enable_scalability == true && 'true' || 'false' }}
674687
AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID: ${{ inputs.AZURE_ENV_EXISTING_LOG_ANALYTICS_WORKSPACE_RID }}
675688
AZURE_EXISTING_AIPROJECT_RESOURCE_ID: ${{ inputs.AZURE_EXISTING_AIPROJECT_RESOURCE_ID }}
676689
secrets: inherit

0 commit comments

Comments
 (0)