-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The goal is to avoid redundant frontend builds for each architecture, since the frontend artifacts are just plain text files / noarch. For now it's only for upstream builds, but the goal would be to have the same with konflux
- Loading branch information
Showing
3 changed files
with
27 additions
and
21 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM docker.io/library/node:18-alpine as web-builder | ||
|
||
USER node | ||
|
||
ARG BUILDSCRIPT | ||
WORKDIR /opt/app-root | ||
|
||
COPY --chown=node web/package-lock.json web/package-lock.json | ||
COPY --chown=node web/package.json web/package.json | ||
WORKDIR /opt/app-root/web | ||
RUN CYPRESS_INSTALL_BINARY=0 npm --legacy-peer-deps ci | ||
|
||
WORKDIR /opt/app-root | ||
COPY --chown=node web web | ||
COPY mocks mocks | ||
|
||
WORKDIR /opt/app-root/web | ||
RUN npm run format-all | ||
RUN npm run build$BUILDSCRIPT | ||
|
||
FROM scratch | ||
|
||
COPY --from=web-builder /opt/app-root/web/dist /opt/app-root/web/dist |
This file contains 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