fix: Codespace ACR build and push script failure - #688
Open
Priyanka2-Microsoft wants to merge 1 commit into
Open
fix: Codespace ACR build and push script failure#688Priyanka2-Microsoft wants to merge 1 commit into
Priyanka2-Microsoft wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the ACR build-and-push scripts used in Codespaces/deploy workflows by extracting the repeated az acr build invocation into a reusable helper, improving readability and reducing duplication.
Changes:
- Add a
build_imageBash function to centralizeaz acr buildusage. - Add a
Build-ImagePowerShell function (with exit-code checking) to centralizeaz acr buildusage. - Update each image build step to call the new helper functions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| infra/scripts/acr_build_push.sh | Introduces build_image() and replaces repeated az acr build blocks with function calls. |
| infra/scripts/acr_build_push.ps1 | Introduces Build-Image and replaces repeated az acr build blocks with function calls plus consistent failure handling. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors both the PowerShell (
acr_build_push.ps1) and Bash (acr_build_push.sh) scripts used to build and push Docker images to Azure Container Registry. The main improvement is the introduction of reusable functions for building images, which simplifies the scripts and reduces code duplication.Script refactoring for maintainability and DRY principles:
Build-Imagefunction inacr_build_push.ps1to encapsulate the logic for building images, replacing repeatedaz acr buildcommands with function calls for each image. [1] [2]build_imagefunction inacr_build_push.shfor the same purpose, replacing repeatedaz acr buildinvocations with calls to this function. [1] [2]BUG ID - https://dev.azure.com/CSACTOSOL/CSA%20Solutioning/_workitems/edit/50767/
Does this introduce a breaking change?
Yes
No
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information