Skip to content

Commit aa996b6

Browse files
fix: enhance deployment output extraction and update post-deployment script references
1 parent b95f3bc commit aa996b6

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

.github/workflows/deploy.yml

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -129,46 +129,49 @@ jobs:
129129
embeddingDeploymentCapacity=${{ env.TEXT_EMBEDDING_MIN_CAPACITY }} \
130130
imageTag="latest"
131131
132-
- name: Get Deployment Output
132+
- name: Get Deployment Output and extract Values
133133
id: get_output
134134
run: |
135135
set -e
136136
echo "Fetching deployment output..."
137137
BICEP_OUTPUT=$(az deployment group show --name ${{ env.SOLUTION_PREFIX }}-deployment --resource-group ${{ env.RESOURCE_GROUP_NAME }} --query "properties.outputs" -o json)
138-
echo "BICEP_OUTPUT=$BICEP_OUTPUT" >> $GITHUB_ENV
139-
echo "Deployment output: $BICEP_OUTPUT"
140-
141-
- name: Run Post-Deployment Script
142-
id: post_deploy
143-
run: |
144-
set -e
145138
echo "Extracting deployment output..."
146139
WEBAPP_URL=$(echo $BICEP_OUTPUT | jq -r '.weB_APP_URL.value')
140+
echo "WEBAPP_URL=$WEBAPP_URL" >> $GITHUB_ENV
147141
STORAGE_ACCOUNT_NAME=$(echo $BICEP_OUTPUT | jq -r '.storagE_ACCOUNT_NAME.value')
142+
echo "STORAGE_ACCOUNT_NAME=$STORAGE_ACCOUNT_NAME" >> $GITHUB_ENV
148143
STORAGE_CONTAINER_NAME=$(echo $BICEP_OUTPUT | jq -r '.storagE_CONTAINER_NAME.value')
144+
echo "STORAGE_CONTAINER_NAME=$STORAGE_CONTAINER_NAME" >> $GITHUB_ENV
149145
KEY_VAULT_NAME=$(echo $BICEP_OUTPUT | jq -r '.keY_VAULT_NAME.value')
146+
echo "KEY_VAULT_NAME=$KEY_VAULT_NAME" >> $GITHUB_ENV
150147
COSMOSDB_ACCOUNT_NAME=$(echo $BICEP_OUTPUT | jq -r '.cosmosdB_ACCOUNT_NAME.value')
148+
echo "COSMOSDB_ACCOUNT_NAME=$COSMOSDB_ACCOUNT_NAME" >> $GITHUB_ENV
149+
echo "Deployment output: $BICEP_OUTPUT"
150+
151+
- name: Run Post-Deployment Script
152+
id: post_deploy
153+
run: |
154+
set -e
151155
152156
echo "Opening webapp URL in browser..."
153-
xdg-open "$WEBAPP_URL" || echo "xdg-open command not found."
154-
echo "Webapp URL: $WEBAPP_URL" >> $GITHUB_ENV
157+
xdg-open "${{ env.WEBAPP_URL }}" || echo "xdg-open command not found."
155158
156159
az account set --subscription "$SUBSCRIPTION_ID"
157160
158161
echo "Running post-deployment script..."
159162
bash ./infra/scripts/process_sample_data.sh \
160-
"$STORAGE_ACCOUNT_NAME" \
161-
"$STORAGE_CONTAINER_NAME" \
162-
"$KEY_VAULT_NAME" \
163-
"$COSMOSDB_ACCOUNT_NAME" \
163+
"${{ env.STORAGE_ACCOUNT_NAME }}" \
164+
"${{ env.STORAGE_CONTAINER_NAME }}" \
165+
"${{ env.KEY_VAULT_NAME }}" \
166+
"${{ env.COSMOSDB_ACCOUNT_NAME }}" \
164167
"${{ env.RESOURCE_GROUP_NAME }}" \
165168
166169
- name: Call Test Automation Workflow
167170
if: success()
168171
id: call_test_automation
169172
uses: ./.github/workflows/gp-test-automation.yml
170173
with:
171-
webapp_url: ${{ env.WEBAPP_URL }}
174+
DOCGEN_URL: ${{ env.WEBAPP_URL }}
172175

173176

174177
- name: Extract AI Services and Key Vault Names

0 commit comments

Comments
 (0)