Skip to content

Bug 1994038: Update kubebuilder installation in the build root dockerfile #174

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,20 @@ FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8

ARG KUBEBUILDER_RELEASE=2.3.1
# Install test dependencies
# TODO(tflannag): This is a quick fix to kubebuilder's quick start instructions
# that were failing e2e tests. We'll want to update our o/release ci-operator
# configuration to allow build_root changes to be reflected in a PR vs.
# instead of the CI pipeline always defaulting to building the HEAD version
# of the dockerfile:
# - https://docs.ci.openshift.org/docs/architecture/ci-operator/#build-root-image
# Note(tflannag): We ran into some issues curling from the https://go.kubebuilder.io/dl
# domain as the output file was HTLM-based, so curl from the github releases
# until this has been resolved.
RUN yum install -y skopeo && \
export OS=$(go env GOOS) && \
export ARCH=$(go env GOARCH) && \
curl -L "https://go.kubebuilder.io/dl/${KUBEBUILDER_RELEASE}/${OS}/${ARCH}" | tar -xz -C /tmp/ && \
curl -L "https://github.com/kubernetes-sigs/kubebuilder/releases/download/v${KUBEBUILDER_RELEASE}/kubebuilder_${KUBEBUILDER_RELEASE}_${OS}_${ARCH}.tar.gz" | tar -xz -C /tmp/ && \
mv /tmp/kubebuilder_${KUBEBUILDER_RELEASE}_${OS}_${ARCH}/ /usr/local/kubebuilder && \
export PATH=$PATH:/usr/local/kubebuilder/bin && \
kubebuilder version && \
echo "Kubebuilder installation complete!"