1313 - cron : " 0 11,23 * * *" # Runs at 11:00 AM and 11:00 PM GMT
1414 workflow_dispatch : # Allow manual triggering
1515env :
16- GPT_MIN_CAPACITY : 1
16+ GPT_MIN_CAPACITY : 150
17+ O4_MINI_MIN_CAPACITY : 50
18+ GPT41_MINI_MIN_CAPACITY : 50
1719 BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
1820
1921jobs :
3638 export AZURE_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}
3739 export AZURE_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRET }}
3840 export AZURE_SUBSCRIPTION_ID="${{ secrets.AZURE_SUBSCRIPTION_ID }}"
39- export GPT_MIN_CAPACITY="1"
41+ export GPT_MIN_CAPACITY="150"
42+ export O4_MINI_MIN_CAPACITY="50"
43+ export GPT41_MINI_MIN_CAPACITY="50"
4044 export AZURE_REGIONS="${{ vars.AZURE_REGIONS }}"
4145
4246 chmod +x infra/scripts/checkquota.sh
@@ -122,7 +126,7 @@ jobs:
122126 elif [[ "${{ env.BRANCH_NAME }}" == "hotfix" ]]; then
123127 IMAGE_TAG="hotfix"
124128 else
125- IMAGE_TAG="latest "
129+ IMAGE_TAG="latest_v3 "
126130 fi
127131
128132 # Generate current timestamp in desired format: YYYY-MM-DDTHH:MM:SS.SSSSSSSZ
@@ -135,12 +139,12 @@ jobs:
135139 solutionName=${{ env.SOLUTION_PREFIX }} \
136140 location="${{ env.AZURE_LOCATION }}" \
137141 gptModelDeploymentType="GlobalStandard" \
138- gptModelName="gpt-4o " \
139- gptModelVersion="2024-08-06 " \
142+ gptModelName="gpt-4.1-mini " \
143+ gptModelVersion="2025-04-14 " \
140144 backendContainerImageTag="${IMAGE_TAG}" \
141145 frontendContainerImageTag="${IMAGE_TAG}" \
142146 azureAiServiceLocation='${{ env.AZURE_LOCATION }}' \
143- gptModelCapacity=1 \
147+ gptModelCapacity=50 \
144148 createdBy="Pipeline" \
145149 tags="{'SecurityControl':'Ignore','Purpose':'Deploying and Cleaning Up Resources for Validation','CreatedDate':'$current_date'}" \
146150 --output json
@@ -159,9 +163,10 @@ jobs:
159163 - name : Get Container App Backend URL
160164 id : get_backend_url
161165 run : |
166+ # Get specifically the backend container app (not the MCP container app)
162167 CONTAINER_APP_NAME=$(az containerapp list \
163168 --resource-group ${{ env.RESOURCE_GROUP_NAME }} \
164- --query "[0 ].name" -o tsv)
169+ --query "[?starts_with(name, 'ca-') && !contains(name, 'mcp') ].name" -o tsv)
165170
166171 MACAE_URL_API=$(az containerapp show \
167172 --name "$CONTAINER_APP_NAME" \
@@ -171,6 +176,38 @@ jobs:
171176 echo "MACAE_URL_API=https://${MACAE_URL_API}" >> $GITHUB_OUTPUT
172177 echo "CONTAINER_APP=${CONTAINER_APP_NAME}" >> $GITHUB_OUTPUT
173178
179+ - name : Run Post deployment scripts
180+ run : |
181+ set -e
182+ az account set --subscription "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
183+
184+ echo "Running post-deployment script..."
185+
186+ # Extract required resource names from the deployment
187+ STORAGE_ACCOUNT=$(az resource list --resource-group ${{ env.RESOURCE_GROUP_NAME }} --resource-type "Microsoft.Storage/storageAccounts" --query "[0].name" -o tsv)
188+ AI_SEARCH=$(az resource list --resource-group ${{ env.RESOURCE_GROUP_NAME }} --resource-type "Microsoft.Search/searchServices" --query "[0].name" -o tsv)
189+
190+ echo "Found Storage Account: $STORAGE_ACCOUNT"
191+ echo "Found AI Search Service: $AI_SEARCH"
192+ echo "Backend URL: ${{ steps.get_backend_url.outputs.MACAE_URL_API }}"
193+
194+ # Run upload team config script with parameters
195+ bash infra/scripts/upload_team_config.sh \
196+ "${{ steps.get_backend_url.outputs.MACAE_URL_API }}" \
197+ "data/agent_teams" \
198+ "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
199+
200+ # Run process sample data script with parameters
201+ bash infra/scripts/process_sample_data.sh \
202+ "$STORAGE_ACCOUNT" \
203+ "sample-dataset" \
204+ "$AI_SEARCH" \
205+ "sample-dataset-index" \
206+ "${{ env.RESOURCE_GROUP_NAME }}" \
207+ "${{ secrets.AZURE_SUBSCRIPTION_ID }}"
208+
209+ echo "=== Post-Deployment Script Completed Successfully ==="
210+
174211 - name : Set Deployment Status
175212 id : deployment_status
176213 if : always()
@@ -181,9 +218,20 @@ jobs:
181218 echo "SUCCESS=false" >> $GITHUB_OUTPUT
182219 fi
183220
221+ e2e-test :
222+ needs : deploy
223+ if : needs.deploy.outputs.DEPLOYMENT_SUCCESS == 'true'
224+ uses : ./.github/workflows/test-automation.yml
225+ with :
226+ MACAE_WEB_URL : ${{ needs.deploy.outputs.WEBAPP_URL }}
227+ MACAE_URL_API : ${{ needs.deploy.outputs.MACAE_URL_API }}
228+ MACAE_RG : ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
229+ MACAE_CONTAINER_APP : ${{ needs.deploy.outputs.CONTAINER_APP }}
230+ secrets : inherit
231+
184232 cleanup-deployment :
185233 if : always() && needs.deploy.outputs.RESOURCE_GROUP_NAME != ''
186- needs : [deploy]
234+ needs : [deploy, e2e-test ]
187235 runs-on : ubuntu-latest
188236 env :
189237 RESOURCE_GROUP_NAME : ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
@@ -317,7 +365,7 @@ jobs:
317365 echo "Resource purging completed successfully"
318366
319367 - name : Send Notification on Failure
320- if : failure()
368+
321369 run : |
322370 RUN_URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
323371
0 commit comments