Skip to content

Commit 44d64da

Browse files
Merge pull request #430 from microsoft/fix-deploy-pipeline
fix: fix deployment pipeline
2 parents 43ab5cc + f616ecf commit 44d64da

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
schedule:
88
- cron: '0 9,21 * * *' # Runs at 9:00 AM and 9:00 PM GMT
99

10+
env:
11+
GPT_MIN_CAPACITY: 10
12+
TEXT_EMBEDDING_MIN_CAPACITY: 10
13+
1014
jobs:
1115
deploy:
1216
runs-on: ubuntu-latest
@@ -30,8 +34,8 @@ jobs:
3034
export AZURE_TENANT_ID=${{ secrets.AZURE_TENANT_ID }}
3135
export AZURE_CLIENT_SECRET=${{ secrets.AZURE_CLIENT_SECRET }}
3236
export AZURE_SUBSCRIPTION_ID="${{ secrets.AZURE_SUBSCRIPTION_ID }}"
33-
export GPT_MIN_CAPACITY="30"
34-
export TEXT_EMBEDDING_MIN_CAPACITY="30"
37+
export GPT_MIN_CAPACITY=${{ env.GPT_MIN_CAPACITY }}
38+
export TEXT_EMBEDDING_MIN_CAPACITY=${{ env.TEXT_EMBEDDING_MIN_CAPACITY }}
3539
export AZURE_REGIONS="${{ vars.AZURE_REGIONS }}"
3640
3741
chmod +x scripts/checkquota.sh
@@ -114,17 +118,17 @@ jobs:
114118
--template-file infra/main.json \
115119
--parameters \
116120
environmentName="${{ env.SOLUTION_PREFIX }}" \
117-
secondaryLocation="eastus2" \
121+
secondaryLocation="northcentralus" \
118122
deploymentType="GlobalStandard" \
119123
gptModelName="gpt-4o" \
120124
azureOpenaiAPIVersion="2024-05-01-preview" \
121-
gptDeploymentCapacity="10" \
125+
gptDeploymentCapacity=${{ env.GPT_MIN_CAPACITY }} \
122126
embeddingModel="text-embedding-ada-002" \
123-
embeddingDeploymentCapacity="30" \
127+
embeddingDeploymentCapacity=${{ env.TEXT_EMBEDDING_MIN_CAPACITY }} \
124128
imageTag="latest"
125129
126130
- name: Extract AI Services and Key Vault Names
127-
if: always()
131+
if: always() && steps.check_create_rg.outcome == 'success'
128132
run: |
129133
echo "Fetching AI Services and Key Vault names before deletion..."
130134
@@ -145,7 +149,7 @@ jobs:
145149
echo "AI_SERVICES=$AI_SERVICES" >> $GITHUB_ENV
146150

147151
- name: Delete Bicep Deployment
148-
if: success()
152+
if: always()
149153
run: |
150154
set -e
151155
echo "Checking if resource group exists..."
@@ -162,6 +166,7 @@ jobs:
162166
fi
163167
164168
- name: Wait for Resource Deletion to Complete
169+
if: always()
165170
run: |
166171
echo "Waiting for all deployed resources (including AI Services) to be deleted..."
167172
@@ -289,7 +294,7 @@ jobs:
289294
290295
EMAIL_BODY=$(cat <<EOF
291296
{
292-
"body": "<p>Dear Team,</p><p>We would like to inform you that the Research Assistant 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>"
297+
"body": "<p>Dear Team,</p><p>We would like to inform you that the DocGen 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>"
293298
}
294299
EOF
295300
)

0 commit comments

Comments
 (0)