fix: ACR build and push script failing - #692
Open
Priyanka2-Microsoft wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request refactors the ACR remote build/push automation for Bash and PowerShell by staging a temporary Docker build context (intended to limit what gets sent to ACR), and updates ContentProcessorWeb’s .dockerignore to better exclude common local artifacts from build contexts.
Changes:
- Refactors
acr_build_push.shto stage a temporary build context directory per image before runningaz acr build. - Refactors
acr_build_push.ps1similarly, improving path handling and ensuring staging cleanup viatry/finally. - Updates
src/ContentProcessorWeb/.dockerignorewith additional exclusions and comment cleanup.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| src/ContentProcessorWeb/.dockerignore | Adds additional ignore patterns intended to keep common frontend/build artifacts out of ACR build contexts. |
| infra/scripts/acr_build_push.sh | Introduces staging-directory build contexts for ACR builds and related refactoring. |
| infra/scripts/acr_build_push.ps1 | Introduces staging-directory build contexts for ACR builds, with improved path handling and cleanup. |
💡 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.
Purpose
This pull request refactors and improves the Azure Container Registry (ACR) build and push scripts for both PowerShell and Bash, and updates the
.dockerignorefile forContentProcessorWeb. The main goals are to ensure only tracked source files are included in Docker build contexts, improve cross-platform compatibility, and streamline the handling of temporary build directories.Build context handling and script improvements:
acr_build_push.ps1andacr_build_push.shscripts to create a temporary staging directory for each image build, copying only files tracked by Git (usinggit ls-files). This ensures that only relevant, version-controlled files are included in the Docker build context, reducing image size and avoiding accidental inclusion of local or untracked files. [1] [2].Pathproperty for consistency and cross-platform compatibility.Join-Pathand string interpolation for file paths in the PowerShell script, improving readability and maintainability..dockerignore updates for ContentProcessorWeb:
node_modules,build,coverage,.cache,.parcel-cache,.pnpm-store,.pnpm-cache,.pnpm). This aligns with the new build context logic and prevents unnecessary files from being included in Docker images. [1] [2]Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information