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 1cd3b57 commit e7239d6
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/deploy-stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,22 @@ jobs:
# --query "{status:properties.provisioningState, error:properties.error.message}" \
2>&1)
# Capture the exit status
exit_code=$?
# Print the raw output
echo "$output"
# Check if the command was successful
if [ $? -ne 0 ]; then
if [ $exit_code -ne 0 ]; then
# Extract the error details
error_message=$(echo "$output" | grep -oP '(?<=ERROR: ).*')
echo "Deployment failed with the following error:"
echo "$output"
echo "$error_message"
exit 1
else
echo "Deployment succeeded."
echo "$output"
fi
Expand Down

0 comments on commit e7239d6

Please sign in to comment.