Skip to content

Commit 0ba8af9

Browse files
Merge pull request #172 from timflannagan/fix-build-root-dockerfile
Bug 1996306: Update kubebuilder installation in the build root dockerfile
2 parents 0934d42 + f55f561 commit 0ba8af9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

base.Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,20 @@ FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.16-openshift-4.8
44

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

0 commit comments

Comments
 (0)