Skip to content

build: ensure stale content does not get copied into container#3294

Open
rsdmike wants to merge 1 commit intomainfrom
build2
Open

build: ensure stale content does not get copied into container#3294
rsdmike wants to merge 1 commit intomainfrom
build2

Conversation

@rsdmike
Copy link
Copy Markdown
Member

@rsdmike rsdmike commented May 5, 2026

device-management-toolkit/console#684

PR Checklist

  • Unit Tests have been added for new changes
  • API tests have been updated if applicable
  • All commented code has been removed
  • If you've added a dependency, you've ensured license is compatible with Apache 2.0 and clearly outlined the added dependency.

What are you changing?

Anything the reviewer should know when reviewing this PR?

If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )

Copilot AI review requested due to automatic review settings May 5, 2026 20:50
@rsdmike rsdmike enabled auto-merge (squash) May 5, 2026 20:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the container build process to avoid accidentally packaging stale Angular build artifacts (e.g., dist/ or ui/) that may exist in the Docker build context, and ensures enterprise builds can have their API placeholder replaced at runtime.

Changes:

  • Extend init.sh to replace the ##CONSOLE_SERVER_API## placeholder used by the enterprise environment configuration.
  • Adjust the Docker build artifact selection logic to prefer the ui/browser output (enterprise) before falling back to dist/samplewebui/browser.
  • Add dist/, ui/, coverage/, and .angular/ to .dockerignore to prevent old build outputs/caches from being copied into the image build context.

Reviewed changes

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

File Description
init.sh Adds runtime placeholder substitution for ##CONSOLE_SERVER_API## in built JS bundles.
Dockerfile Prefer ui/browser over dist/samplewebui/browser when selecting the build output to package.
.dockerignore Excludes common build outputs/caches from Docker context to prevent stale artifacts being packaged.

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