Skip to content

fix: updated get values from Azure deployment outputs#995

Open
vishalsvs7 wants to merge 2 commits into
microsoft:mainfrom
vishalsvs7:main
Open

fix: updated get values from Azure deployment outputs#995
vishalsvs7 wants to merge 2 commits into
microsoft:mainfrom
vishalsvs7:main

Conversation

@vishalsvs7

Copy link
Copy Markdown
Contributor

Purpose

Getting values from Azure deployment outputs

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the post-deployment build_and_push_images.sh script to retrieve required values from an Azure resource group’s deployment outputs (instead of only relying on azd env), and adds validation/reporting for missing outputs.

Changes:

  • Enhances get_values_from_az_deployment() to fetch deployment outputs once and extract required output values with clearer missing-value reporting.
  • Adds a required-values list and prints a sorted list of missing Azure deployment outputs when extraction fails.
  • Updates ACR public network configuration toggling flags used during remote builds.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread infra/scripts/build_and_push_images.sh Outdated
Comment on lines +100 to +104
extract_value() {
echo "$deploymentOutputs" | grep -i -A 3 "\"$1\"" | grep '"value"' | sed 's/.*"value": *"\([^"]*\)".*/\1/'
local primary_key="$1"
local fallback_key="$2"
local value

Comment thread infra/scripts/build_and_push_images.sh Outdated
frontendAppName=$(extract_value "frontenD_APP_NAME" "FRONTEND_APP_NAME")

# Define required values with their display names
declare -A required_values=(
Comment thread infra/scripts/build_and_push_images.sh Outdated
)

# Validate required values
missing_values=()
Comment thread infra/scripts/build_and_push_images.sh Outdated
Comment on lines +181 to +185
case "$original_acr_public_access" in
"enabled"|"Enabled") restore_value=true ;;
"disabled"|"Disabled") restore_value=false ;;
*) restore_value="$original_acr_public_access" ;;
esac
Comment thread infra/scripts/build_and_push_images.sh Outdated
--name "$acrName" \
--resource-group "$resourceGroupName" \
--public-network-access Enabled \
--public-network-enabled true \
Copilot AI review requested due to automatic review settings July 10, 2026 06:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 3 comments.

Comment on lines +165 to +170
az acr update \
--name "$acrName" \
--resource-group "$resourceGroupName" \
--public-network-enabled true \
--default-action Allow \
--output none
--name "$acrName" \
--resource-group "$resourceGroupName" \
--public-network-access "$original_acr_public_access" \
--public-network-enabled $restore_value \
Comment on lines +89 to +90
deploymentName=$(az group show --name "$resourceGroupName" --query "tags.DeploymentName" -o tsv)
echo "Deployment Name (from tag): $deploymentName"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants