Skip to content

chore: update build_and_push script to get values from RG, update pos… - #1125

Open
NirajC3-Microsoft wants to merge 2 commits into
devfrom
psl-updateacrscript
Open

chore: update build_and_push script to get values from RG, update pos…#1125
NirajC3-Microsoft wants to merge 2 commits into
devfrom
psl-updateacrscript

Conversation

@NirajC3-Microsoft

Copy link
Copy Markdown
Contributor

Purpose

This pull request enhances the post-provisioning scripts for both PowerShell and Bash to support direct Azure resource discovery using a resource group argument, improves cross-platform compatibility, and adds logic to reconstruct AI Foundry resource values using naming conventions. These changes make the scripts more robust and flexible, reducing reliance on environment files and increasing their ability to recover missing configuration values.

Resource discovery and configuration:

  • Both Build-And-Push-Images.ps1 and build_and_push_images.sh now accept a resource group parameter (-ResourceGroup or positional argument), allowing the scripts to query Azure directly for ACR, Container Apps, and Web App resources if provided, rather than relying solely on environment files. [1] [2] [3] [4]
  • Default values for image names, ports, and build modes are set using environment variables or sensible defaults when discovering resources via resource group. [1] [2]

Cross-platform and reliability improvements:

  • Output from Azure CLI commands is now stripped of Windows carriage returns (tr -d '\r') in Bash scripts to improve compatibility across environments (e.g., Git Bash on Windows). [1] [2] [3]
  • Improved error handling and messaging if required CLI tools are missing when using resource group discovery. [1] [2]

AI Foundry resource reconstruction:

  • Added logic to both post_deploy.ps1 and post_deploy.sh to reconstruct AI Foundry account and project endpoints using naming conventions (aif-<suffix>, proj-<suffix>) if not present in deployment outputs, increasing resilience to missing configuration. [1] [2] [3] [4]

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

This comment was marked as resolved.

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