Skip to content

Commit

Permalink
[release-v1.15] Update image refs (knative#534)
Browse files Browse the repository at this point in the history
* [release-v1.15] Update image refs

* [release-v1.15] Refactor image ref update
  • Loading branch information
dsimansk authored Nov 27, 2024
1 parent c6cee35 commit 840fdde
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 27 deletions.
6 changes: 2 additions & 4 deletions openshift/ci-operator/knative-images/kn/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# DO NOT EDIT! Generated Dockerfile for cmd/kn.
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal
ARG IMAGE_KN_PLUGIN_FUNC_UTIL=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel8@sha256:134a07b2ecd8bb485d7f20bf23e863f5cec5620134c4a26b65e31d23c3076175
ARG IMAGE_KN_PLUGIN_EVENT_SENDER=registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel8@sha256:e2ea8370284a4807712849a0ec8c786bbf7cb6cd78dc2309c14e87470df235e6

FROM $GO_BUILDER as builder

Expand All @@ -11,9 +9,9 @@ COPY . .

ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=$IMAGE_KN_PLUGIN_FUNC_UTIL
ENV KN_PLUGIN_EVENT_SENDER_IMAGE=$IMAGE_KN_PLUGIN_EVENT_SENDER

ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel8@sha256:63fbd304ffb93e5883b987ac90a476cd9ff9946f164ca8acb9c1a95fee84bcb3
ENV KN_PLUGIN_EVENT_SENDER_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel8@sha256:1d2a8b786bd09301530d37440ce6501527cfd511ba78d97da5eda952a6558ebe
RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/kn

FROM $GO_RUNTIME
Expand Down
22 changes: 0 additions & 22 deletions openshift/dockerfile.patch

This file was deleted.

11 changes: 10 additions & 1 deletion openshift/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,13 @@ install_generate_hack_tool || exit 1
--app-file-fmt "/ko-app/%s" \
--dockerfile-image-builder-fmt "registry.ci.openshift.org/openshift/release:rhel-8-release-golang-%s-openshift-4.17"

git apply $repo_root_dir/openshift/dockerfile.patch
#git apply $repo_root_dir/openshift/dockerfile.patch
FUNC_UTIL=$(skopeo inspect -n --format '{{.Digest}}' docker://quay.io/redhat-user-workloads/ocp-serverless-tenant/serverless-operator-135/kn-plugin-func-func-util:1.35.0 --override-os linux --override-arch amd64)
EVENT_SENDER=$(skopeo inspect -n --format '{{.Digest}}' docker://quay.io/redhat-user-workloads/ocp-serverless-tenant/serverless-operator-135/kn-plugin-event-sender:1.35.0 --override-os linux --override-arch amd64)

echo "func-util sha: ${FUNC_UTIL}"
echo "event-sender sha: ${EVENT_SENDER}"

sed -i "/RUN go build.*/ i \
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel8@${FUNC_UTIL}\n\
ENV KN_PLUGIN_EVENT_SENDER_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel8@${EVENT_SENDER}" openshift/ci-operator/knative-images/kn/Dockerfile

0 comments on commit 840fdde

Please sign in to comment.