-
Notifications
You must be signed in to change notification settings - Fork 618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OCPBUGS-6634: Enable building tectonic-console-builder on arm64 and fix the Dockerfile.product to work with no cached artifacts #12444
Merged
openshift-merge-robot
merged 3 commits into
openshift:master
from
aleskandro:fix-arm64-okd
Jan 26, 2023
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,77 @@ | ||
FROM quay.io/coreos/tectonic-console-builder:v24 AS build | ||
|
||
################################################## | ||
# | ||
# go backend build | ||
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.19-openshift-4.13 AS gobuilder | ||
RUN mkdir -p /go/src/github.com/openshift/console/ | ||
ADD . /go/src/github.com/openshift/console/ | ||
WORKDIR /go/src/github.com/openshift/console/ | ||
RUN ./build.sh | ||
RUN ./build-backend.sh | ||
|
||
|
||
################################################## | ||
# | ||
# nodejs frontend build | ||
FROM registry.ci.openshift.org/ocp/builder:rhel-8-base-nodejs-openshift-4.13 AS nodebuilder | ||
|
||
ADD . . | ||
|
||
USER 0 | ||
|
||
ARG YARN_VERSION=v1.22.19 | ||
|
||
# bootstrap yarn so we can install and run the other tools. | ||
RUN CACHED_YARN=./artifacts/yarn-${YARN_VERSION}.tar.gz; \ | ||
if [ -f ${CACHED_YARN} ]; then \ | ||
npm install ${CACHED_YARN}; \ | ||
else \ | ||
npm install https://github.com/yarnpkg/yarn/releases/download/${YARN_VERSION}/yarn-${YARN_VERSION}.tar.gz; \ | ||
fi | ||
|
||
FROM openshift/origin-base | ||
# The REMOTE_SOURCES value is set by the build system to indicate the location of the cachito-backed artifacts cache. | ||
# As cachito might not be available in all environments, we need to make sure the value is set before trying to use it and | ||
# that the COPY layer below doesn't fail. Setting it to be the Dockerfile itself is fairly safe, as it will always be | ||
# available. | ||
ARG REMOTE_SOURCES=./Dockerfile.product | ||
ARG REMOTE_SOURCE_DIR=/tmp/remote-sources | ||
|
||
COPY --from=build /go/src/github.com/openshift/console/frontend/public/dist /opt/bridge/static | ||
COPY --from=build /go/src/github.com/openshift/console/bin/bridge /opt/bridge/bin/bridge | ||
COPY --from=build /go/src/github.com/openshift/console/pkg/graphql/schema.graphql /pkg/graphql/schema.graphql | ||
COPY $REMOTE_SOURCES $REMOTE_SOURCES_DIR | ||
|
||
LABEL io.k8s.display-name="OpenShift Console" \ | ||
io.k8s.description="This is a component of OpenShift Container Platform and provides a web console." \ | ||
io.openshift.tags="openshift" \ | ||
maintainer="Samuel Padgett <[email protected]>" | ||
# use dependencies provided by Cachito | ||
RUN test -d ${REMOTE_SOURCES}/cachito-gomod-with-deps || exit 0; \ | ||
cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/registry-ca.pem . \ | ||
&& cp -f $REMOTE_SOURCES_DIR/cachito-gomod-with-deps/app/frontend/{.npmrc,.yarnrc,yarn.lock} frontend/ | ||
|
||
# prevent download of chromedriver, geckodriver, and the cypress binary as part of module installs | ||
ENV CHROMEDRIVER_SKIP_DOWNLOAD=true \ | ||
GECKODRIVER_SKIP_DOWNLOAD=true \ | ||
CYPRESS_INSTALL_BINARY=0 | ||
|
||
# run the build | ||
RUN container-entrypoint ./build-frontend.sh | ||
|
||
|
||
################################################## | ||
# | ||
# actual base image for final product | ||
FROM registry.ci.openshift.org/ocp/4.13:base | ||
RUN mkdir -p /opt/bridge/bin | ||
COPY --from=gobuilder /go/src/github.com/openshift/console/bin/bridge /opt/bridge/bin | ||
COPY --from=nodebuilder /opt/app-root/src/frontend/public/dist /opt/bridge/static | ||
COPY --from=gobuilder /go/src/github.com/openshift/console/pkg/graphql/schema.graphql /pkg/graphql/schema.graphql | ||
|
||
WORKDIR / | ||
# doesn't require a root user. | ||
USER 1001 | ||
|
||
CMD [ "/opt/bridge/bin/bridge", "--public-dir=/opt/bridge/static" ] | ||
|
||
LABEL \ | ||
io.k8s.description="This is a component of OpenShift Container Platform and provides a web console." \ | ||
com.redhat.component="openshift-enterprise-console-container" \ | ||
maintainer="Samuel Padgett <[email protected]>" \ | ||
name="openshift3/ose-console" \ | ||
License="Apache 2.0" \ | ||
io.k8s.display-name="OpenShift Console" \ | ||
vendor="Red Hat" \ | ||
io.openshift.tags="openshift,console" | ||
|
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 was deleted.
Oops, something went wrong.
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 @@ | ||
Dockerfile |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the test suite use chromium and provide reliable test results? We could install it at least for non-amd64 images.