Skip to content

Commit

Permalink
testing automation flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant-Microsoft committed Sep 6, 2024
1 parent 4fc150c commit dc8d4f8
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,23 @@ jobs:
id: deploy
run: |
set -e
# Execute the deployment and capture the output and error
output=$(az deployment sub create \
# Execute the deployment and capture both output and errors
result=$(az deployment sub create \
--name autoDemo \
--location eastus \
--template-file infra/main.bicep \
--parameters environmentName=pslautomation location=eastus2 2>&1)
--parameters environmentName=pslautomation2 location=eastus2 \
--query "{status:properties.provisioningState, error:properties.error.message}" \
--output json 2>&1)
# Check if the command was successful
if [ $? -ne 0 ]; then
echo "Deployment failed with the following error:"
echo "$output"
echo "$result"
exit 1
else
echo "Deployment succeeded."
echo "$output"
echo "$result"
fi
Expand Down

0 comments on commit dc8d4f8

Please sign in to comment.