Skip to content

Commit e795c53

Browse files
Merge pull request #582 from joshbranham/ubi9-wip
SREP-144: Switch to UBI9 and install Go 1.24
2 parents d13cc36 + 8d710dd commit e795c53

File tree

4 files changed

+17
-15
lines changed

4 files changed

+17
-15
lines changed

boilerplate/openshift/golang-osd-e2e/update

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ OPERATOR_NAME_CAMEL_CASE=${OPERATOR_PROPER_NAME// /}
2121

2222
mkdir -p "${E2E_SUITE_DIRECTORY}"
2323

24-
E2E_SUITE_BUILDER_IMAGE=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.23-openshift-4.19
24+
E2E_SUITE_BUILDER_IMAGE=registry.ci.openshift.org/openshift/release:rhel-9-release-golang-1.24-openshift-4.20
2525
if [[ -n ${KONFLUX_BUILDS} ]]; then
26-
E2E_SUITE_BUILDER_IMAGE="brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.23"
26+
E2E_SUITE_BUILDER_IMAGE="brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.24"
2727
fi
2828

2929
echo "syncing ${E2E_SUITE_DIRECTORY}/Dockerfile"
@@ -109,4 +109,4 @@ sed -e "s/\${OPERATOR_NAME}/${OPERATOR_NAME}/" $(dirname $0)/e2e-template.yml >"
109109
# todo: remove after file is renamed in ALL consumer repos
110110
if [ -f "${E2E_SUITE_DIRECTORY}/test-harness-template.yml" ]; then
111111
rm -f "${E2E_SUITE_DIRECTORY}/test-harness-template.yml"
112-
fi
112+
fi

boilerplate/openshift/golang-osd-operator/Dockerfile.olm-registry

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ COPY ${SAAS_OPERATOR_DIR} manifests
44
RUN initializer --permissive
55

66
# ubi-micro does not work for clusters with fips enabled unless we make OpenSSL available
7-
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
7+
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
88

99
COPY --from=builder /bin/registry-server /bin/registry-server
1010
COPY --from=builder /bin/grpc_health_probe /bin/grpc_health_probe

config/Dockerfile

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FROM quay.io/konflux-ci/yq:latest AS yq
2-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.23 AS builder
2+
FROM registry.redhat.io/ubi9:9.6-1751445649 AS builder
33

44
ARG GOCILINT_VERSION="2.0.2"
55
ARG GOCILINT_SHA256SUM="89cc8a7810dc63b9a37900da03e37c3601caf46d42265d774e0f1a5d883d53e2"
@@ -19,8 +19,12 @@ RUN curl -L -o gh.tar.gz ${GH_LOCATION} && \
1919
tar xzf gh.tar.gz gh_${GH_VERSION}_linux_amd64/bin/gh && \
2020
mv gh_${GH_VERSION}_linux_amd64/bin/gh /usr/local/bin
2121

22-
FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_8_1.23
23-
ENV GOFLAGS="-mod=mod"
22+
FROM registry.redhat.io/ubi9:9.6-1751445649
23+
24+
RUN dnf -y install openssh-clients jq skopeo python3-pyyaml git go-toolset rsync && \
25+
dnf clean all && \
26+
dnf -y autoremove && \
27+
rm -rf /var/cache/dnf
2428

2529
ARG KUSTOMIZE_VERSION="v5.6.0" \
2630
CONTROLLER_GEN_VERSION="v0.16.4" \
@@ -29,6 +33,11 @@ ARG KUSTOMIZE_VERSION="v5.6.0" \
2933
GOVULNCHECK_VERSION="v1.1.4" \
3034
MOCKGEN_VERSION="v0.4.0"
3135

36+
# Set GOPATH to a standard location and add it to PATH
37+
ENV GOPATH=/go
38+
ENV PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
39+
ENV GOFLAGS="-mod=mod"
40+
3241
RUN go install sigs.k8s.io/kustomize/kustomize/v5@${KUSTOMIZE_VERSION} && \
3342
go install sigs.k8s.io/controller-tools/cmd/controller-gen@${CONTROLLER_GEN_VERSION} && \
3443
go install k8s.io/code-generator/cmd/openapi-gen@${OPENAPI_GEN_VERSION} && \
@@ -42,20 +51,13 @@ RUN go install sigs.k8s.io/kustomize/kustomize/v5@${KUSTOMIZE_VERSION} && \
4251
# which is what consumes this image in CI.
4352
# Here we make group permissions match user permissions, since the CI
4453
# non-root user's gid is 0.
45-
SHELL ["/bin/bash", "-c"]
4654
RUN for bit in r x w; do find $(go env GOPATH) -perm -u+${bit} -a ! -perm -g+${bit} -exec chmod g+${bit} '{}' +; done
4755

4856
COPY --from=builder /usr/local/bin/golangci-lint /usr/local/bin
4957
COPY --from=builder /usr/local/bin/gh /usr/local/bin
5058
COPY --from=yq /usr/bin/yq /usr/bin/yq
5159

52-
RUN dnf -y install openssh-clients jq skopeo python3-pyyaml && \
53-
dnf clean all && \
54-
dnf -y autoremove && \
55-
rm -rf /var/cach/dnf
56-
5760
COPY LICENSE .
58-
ENV PATH=$PATH:/go/bin
5961

6062
# In CI, jobs run in this container with a really high UID generated by OCP. This user does
6163
# not exist, and therefore $HOME defaults to `/` which leads to cache issues with things like `go`.

test/projects/file-generate/build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
1+
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
22

33
ENV OPERATOR=/usr/local/bin/file-generate \
44
USER_UID=1001 \

0 commit comments

Comments
 (0)