Skip to content

Commit 8b76892

Browse files
Merge pull request #230 from microsoft/psl-deploypipelinefix
fix: Resolve Deployment Lifecycle Automation pipeline failure
2 parents 279aced + 29586d3 commit 8b76892

File tree

2 files changed

+4
-41
lines changed

2 files changed

+4
-41
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ jobs:
1616
propertydamageclaimform_schema_id: ${{ steps.register.outputs.propertylossdamageclaimform_schema_id }}
1717
RESOURCE_GROUP_NAME: ${{ steps.generate_rg_name.outputs.RESOURCE_GROUP_NAME }}
1818
CONTAINER_WEB_APPURL: ${{ steps.get_output.outputs.CONTAINER_WEB_APPURL }}
19-
SOLUTION_NAME: ${{ steps.get_output.outputs.SOLUTION_NAME }}
2019
DEPLOYMENT_SUCCESS: ${{ steps.deployment_status.outputs.SUCCESS }}
2120
AI_SERVICES_NAME: ${{ steps.get_ai_services_name.outputs.AI_SERVICES_NAME }}
2221
KEYVAULTS: ${{ steps.list_keyvaults.outputs.KEYVAULTS }}
@@ -143,18 +142,13 @@ jobs:
143142
--template-file infra/main.json \
144143
--parameters \
145144
environmentName="${{ env.ENVIRONMENT_NAME }}" \
146-
secondaryLocation="EastUs2" \
145+
enablePrivateNetworking="false" \
146+
secondaryLocation="eastus2" \
147147
contentUnderstandingLocation="WestUS" \
148148
deploymentType="GlobalStandard" \
149149
gptModelName="gpt-4o" \
150150
gptModelVersion="2024-08-06" \
151151
gptDeploymentCapacity="30" \
152-
minReplicaContainerApp="1" \
153-
maxReplicaContainerApp="1" \
154-
minReplicaContainerApi="1" \
155-
maxReplicaContainerApi="1" \
156-
minReplicaContainerWeb="1" \
157-
maxReplicaContainerWeb="1" \
158152
aiDeploymentsLocation="${{ env.AZURE_LOCATION }}" \
159153
--query "properties.outputs" -o json); then
160154
echo "❌ Deployment failed. See logs above."
@@ -171,18 +165,13 @@ jobs:
171165
export CONTAINER_API_APPNAME=$(echo "$DEPLOY_OUTPUT" | jq -r '.containeR_API_APP_NAME.value')
172166
echo "CONTAINER_API_APPNAME=$CONTAINER_API_APPNAME" >> $GITHUB_ENV
173167
174-
export CONTAINER_WEB_APPURL=$(echo "$DEPLOY_OUTPUT" | jq -r '.containeR_WEB_APP_FQDN.value')
168+
export CONTAINER_WEB_APPURL="https://$(echo "$DEPLOY_OUTPUT" | jq -r '.containeR_WEB_APP_FQDN.value')"
175169
echo "CONTAINER_WEB_APPURL=$CONTAINER_WEB_APPURL" >> $GITHUB_ENV
176170
echo "CONTAINER_WEB_APPURL=$CONTAINER_WEB_APPURL" >> $GITHUB_OUTPUT
177171
178172
export CONTAINER_WEB_APPNAME=$(echo "$DEPLOY_OUTPUT" | jq -r '.containeR_WEB_APP_NAME.value')
179173
echo "CONTAINER_WEB_APPNAME=$CONTAINER_WEB_APPNAME" >> $GITHUB_ENV
180174
181-
export SOLUTION_NAME=$(echo "$DEPLOY_OUTPUT" | jq -r '.solutioN_NAME.value')
182-
echo "SOLUTION_NAME=$SOLUTION_NAME" >> $GITHUB_ENV
183-
echo "SOLUTION_NAME=$SOLUTION_NAME" >> $GITHUB_OUTPUT
184-
185-
186175
- name: Register schemas
187176
id: register
188177
run: |
@@ -290,7 +279,6 @@ jobs:
290279
with:
291280
CP_WEB_URL: ${{ needs.deploy.outputs.CONTAINER_WEB_APPURL }}
292281
CP_RG: ${{ needs.deploy.outputs.RESOURCE_GROUP_NAME }}
293-
CP_CONTAINERAPP_PREFIX: ${{ format('ca-{0}', needs.deploy.outputs.SOLUTION_NAME ) }}
294282
secrets: inherit
295283

296284
cleanup:

.github/workflows/test-automation.yml

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ on:
99
CP_RG:
1010
required: true
1111
type: string
12-
CP_CONTAINERAPP_PREFIX:
13-
required: true
14-
type: string
1512

1613
env:
1714
url: ${{ inputs.CP_WEB_URL }}
1815
CP_RG: ${{ inputs.CP_RG }}
19-
CP_CONTAINERAPP_PREFIX: ${{ inputs.CP_CONTAINERAPP_PREFIX }}
2016
accelerator_name: "Content Processing"
2117

2218

@@ -38,16 +34,6 @@ jobs:
3834
az login --service-principal -u ${{ secrets.AZURE_MAINTENANCE_CLIENT_ID }} -p ${{ secrets.AZURE_MAINTENANCE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }}
3935
az account set --subscription ${{ secrets.AZURE_MAINTENANCE_SUBSCRIPTION_ID }}
4036
41-
- name: Start Container App
42-
id: start-container-app
43-
uses: azure/cli@v2
44-
with:
45-
azcliversion: 'latest'
46-
inlineScript: |
47-
az rest -m post -u "/subscriptions/${{ secrets.AZURE_MAINTENANCE_SUBSCRIPTION_ID }}/resourceGroups/${{ env.CP_RG }}/providers/Microsoft.App/containerApps/${{ env.CP_CONTAINERAPP_PREFIX }}-app/start?api-version=2025-01-01"
48-
az rest -m post -u "/subscriptions/${{ secrets.AZURE_MAINTENANCE_SUBSCRIPTION_ID }}/resourceGroups/${{ env.CP_RG }}/providers/Microsoft.App/containerApps/${{ env.CP_CONTAINERAPP_PREFIX }}-api/start?api-version=2025-01-01"
49-
az rest -m post -u "/subscriptions/${{ secrets.AZURE_MAINTENANCE_SUBSCRIPTION_ID }}/resourceGroups/${{ env.CP_RG }}/providers/Microsoft.App/containerApps/${{ env.CP_CONTAINERAPP_PREFIX }}-web/start?api-version=2025-01-01"
50-
5137
- name: Install dependencies
5238
run: |
5339
python -m pip install --upgrade pip
@@ -159,15 +145,4 @@ jobs:
159145
# Send the notification
160146
curl -X POST "${{ secrets.EMAILNOTIFICATION_LOGICAPP_URL_TA }}" \
161147
-H "Content-Type: application/json" \
162-
-d "$EMAIL_BODY" || echo "Failed to send notification"
163-
164-
- name: Stop Container App
165-
if: always()
166-
uses: azure/cli@v2
167-
with:
168-
azcliversion: 'latest'
169-
inlineScript: |
170-
az rest -m post -u "/subscriptions/${{ secrets.AZURE_MAINTENANCE_SUBSCRIPTION_ID }}/resourceGroups/${{ env.CP_RG }}/providers/Microsoft.App/containerApps/${{ env.CP_CONTAINERAPP_PREFIX }}-app/stop?api-version=2025-01-01"
171-
az rest -m post -u "/subscriptions/${{ secrets.AZURE_MAINTENANCE_SUBSCRIPTION_ID }}/resourceGroups/${{ env.CP_RG }}/providers/Microsoft.App/containerApps/${{ env.CP_CONTAINERAPP_PREFIX }}-api/stop?api-version=2025-01-01"
172-
az rest -m post -u "/subscriptions/${{ secrets.AZURE_MAINTENANCE_SUBSCRIPTION_ID }}/resourceGroups/${{ env.CP_RG }}/providers/Microsoft.App/containerApps/${{ env.CP_CONTAINERAPP_PREFIX }}-web/stop?api-version=2025-01-01"
173-
az logout
148+
-d "$EMAIL_BODY" || echo "Failed to send notification"

0 commit comments

Comments
 (0)