Skip to content

Commit eff1685

Browse files
authored
[release-v1.19] Add & Update Dockerfiles for 1.19 (#744)
In hacks generate-ci, I saw the client runs for 1.19 failing due to ``` --- Cleaning up generated code make[1]: *** [Makefile:76: generate-release] Error 1 make[1]: Leaving directory '/home/runner/work/hack/hack/src/github.com/openshift-knative/hack/openshift-knative/eventing' 2025/08/01 07:01:43 Failed to generate Konflux configurations: %w eg.Wait(): failed to Generate dockerfiles with "make generate-release" for "openshift-knative/client" [release-v1.19]: [openshift-knative/client] failed to run make [generate-release]: exit status 2 - exit status 1 make: *** [Makefile:9: generate-ci-no-clean] Error 1 ``` So saw, that it's missing the dockerfiles too. Copied everything from 1.18 branch and adjusted the version for 1.19
1 parent 73ac819 commit eff1685

File tree

11 files changed

+240
-15
lines changed

11 files changed

+240
-15
lines changed

openshift/ci-operator/build-image/Dockerfile

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
FROM registry.ci.openshift.org/ocp/4.17:cli-artifacts as tools
44

55
# Dockerfile to bootstrap build and test in openshift-ci
6-
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.23-openshift-4.19 as builder
6+
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.24-openshift-4.20 as builder
77

88
ARG TARGETARCH
99

openshift/ci-operator/generate-ci-config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ build_root:
3939
dockerfile_path: openshift/ci-operator/build-image/Dockerfile
4040
canonical_go_repository: github.com/knative/client
4141
images:
42-
- dockerfile_path: openshift/ci-operator/knative-images/client/Dockerfile
42+
- dockerfile_path: openshift/ci-operator/knative-images/kn/Dockerfile
4343
from: base
4444
inputs:
4545
bin:
4646
paths:
4747
- destination_dir: .
4848
source_path: /go/bin/kn
4949
to: knative-client
50-
- dockerfile_path: openshift/ci-operator/knative-images/client/Dockerfile.cliartifacts
50+
- dockerfile_path: openshift/ci-operator/knative-images/cli-artifact/Dockerfile
5151
inputs:
5252
bin:
5353
paths:
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This is not generated Dockerfile, yet!
2+
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal
3+
ARG CLI_ARTIFACTS=registry.redhat.io/openshift-serverless-1/kn-cli-artifacts-rhel8:1.16
4+
5+
FROM $CLI_ARTIFACTS as builder
6+
7+
FROM $GO_RUNTIME
8+
9+
ARG VERSION=knative-v1.19
10+
11+
RUN mkdir -p /usr/share/kn
12+
13+
COPY --from=builder /usr/share/kn /usr/share/kn
14+
COPY LICENSE /licenses/
15+
16+
USER 65532
17+
18+
LABEL \
19+
com.redhat.component="openshift-serverless-1-client-cli-artifacts-rhel8-container" \
20+
name="openshift-serverless-1/client-cli-artifacts-rhel8" \
21+
version=$VERSION \
22+
summary="Red Hat OpenShift Serverless 1 Client Cli Artifacts" \
23+
maintainer="[email protected]" \
24+
description="Red Hat OpenShift Serverless 1 Client Cli Artifacts" \
25+
io.k8s.display-name="Red Hat OpenShift Serverless 1 Client Cli Artifacts" \
26+
io.k8s.description="Red Hat OpenShift Serverless Client Cli Artifacts" \
27+
io.openshift.tags="cli-artifacts"
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# DO NOT EDIT! Generated Dockerfile for cmd/kn.
2+
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.24-openshift-4.20
3+
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal
4+
5+
FROM $GO_BUILDER as builder
6+
7+
WORKDIR /workspace
8+
COPY . .
9+
10+
ENV CGO_ENABLED=1
11+
ENV GOEXPERIMENT=strictfipsruntime
12+
ENV GOFLAGS=''
13+
14+
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel8@sha256:0ae40d26e834e208d0909b90fb3a37c3feb38a299034b5086f1bec69d6719eb2
15+
ENV KN_PLUGIN_EVENT_SENDER_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-event-sender-rhel8@sha256:58e3ccea5c558575fe4adc6f5f6d570ebec0934de1ba1110bc32fe76fb379c7e
16+
RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/kn
17+
18+
FROM $GO_RUNTIME
19+
20+
ARG VERSION=knative-v1.19
21+
22+
COPY --from=builder /usr/bin/main /ko-app/kn
23+
COPY LICENSE /licenses/
24+
25+
USER 65532
26+
27+
LABEL \
28+
com.redhat.component="openshift-serverless-1-client-kn-rhel8-container" \
29+
name="openshift-serverless-1/client-kn-rhel8" \
30+
version=$VERSION \
31+
summary="Red Hat OpenShift Serverless 1 Client Kn" \
32+
maintainer="[email protected]" \
33+
description="Red Hat OpenShift Serverless 1 Client Kn" \
34+
io.k8s.display-name="Red Hat OpenShift Serverless 1 Client Kn" \
35+
io.k8s.description="Red Hat OpenShift Serverless Client Kn" \
36+
io.openshift.tags="kn"
37+
38+
ENTRYPOINT ["/ko-app/kn"]
Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
1-
FROM openshift/origin-base
1+
# DO NOT EDIT! Generated Dockerfile for vendor/knative.dev/serving/test/test_images/grpc-ping.
2+
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.24-openshift-4.20
3+
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal
4+
5+
FROM $GO_BUILDER as builder
6+
7+
WORKDIR /workspace
8+
COPY . .
9+
10+
ENV CGO_ENABLED=1
11+
ENV GOEXPERIMENT=strictfipsruntime
12+
ENV GOFLAGS=''
13+
14+
RUN go build -tags strictfipsruntime -o /usr/bin/main knative.dev/serving/test/test_images/grpc-ping
15+
16+
FROM $GO_RUNTIME
17+
18+
ARG VERSION=knative-v1.19
19+
20+
COPY --from=builder /usr/bin/main /ko-app/grpc-ping
21+
COPY LICENSE /licenses/
22+
223
USER 65532
324

4-
ADD grpc-ping /ko-app/grpc-ping
25+
LABEL \
26+
com.redhat.component="openshift-serverless-1-client-vendor-knative.dev-serving-test-test-images-grpc-ping-rhel8-container" \
27+
name="openshift-serverless-1/client-vendor-knative.dev-serving-test-test-images-grpc-ping-rhel8" \
28+
version=$VERSION \
29+
summary="Red Hat OpenShift Serverless 1 Client Vendor Knative.Dev Serving Test Test Images Grpc Ping" \
30+
maintainer="[email protected]" \
31+
description="Red Hat OpenShift Serverless 1 Client Vendor Knative.Dev Serving Test Test Images Grpc Ping" \
32+
io.k8s.display-name="Red Hat OpenShift Serverless 1 Client Vendor Knative.Dev Serving Test Test Images Grpc Ping" \
33+
io.k8s.description="Red Hat OpenShift Serverless Client Vendor Knative.Dev Serving Test Test Images Grpc Ping" \
34+
io.openshift.tags="vendor-knative.dev-serving-test-test-images-grpc-ping"
535

6-
ENTRYPOINT ["/ko-app/grpc-ping"]
36+
ENTRYPOINT ["/ko-app/grpc-ping"]
Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,37 @@
1-
FROM openshift/origin-base
1+
# DO NOT EDIT! Generated Dockerfile for test/test_images/helloworld.
2+
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.24-openshift-4.20
3+
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal
4+
5+
FROM $GO_BUILDER as builder
6+
7+
WORKDIR /workspace
8+
COPY . .
9+
10+
ENV CGO_ENABLED=1
11+
ENV GOEXPERIMENT=strictfipsruntime
12+
ENV GOFLAGS=''
13+
14+
RUN GOWORK=off go mod vendor
15+
RUN go build -tags strictfipsruntime -o /usr/bin/main ./test/test_images/helloworld
16+
17+
FROM $GO_RUNTIME
18+
19+
ARG VERSION=knative-v1.19
20+
21+
COPY --from=builder /usr/bin/main /ko-app/helloworld
22+
COPY LICENSE /licenses/
23+
224
USER 65532
325

4-
ADD helloworld /ko-app/helloworld
26+
LABEL \
27+
com.redhat.component="openshift-serverless-1-client-test-test-images-helloworld-rhel8-container" \
28+
name="openshift-serverless-1/client-test-test-images-helloworld-rhel8" \
29+
version=$VERSION \
30+
summary="Red Hat OpenShift Serverless 1 Client Test Test Images Helloworld" \
31+
maintainer="[email protected]" \
32+
description="Red Hat OpenShift Serverless 1 Client Test Test Images Helloworld" \
33+
io.k8s.display-name="Red Hat OpenShift Serverless 1 Client Test Test Images Helloworld" \
34+
io.k8s.description="Red Hat OpenShift Serverless Client Test Test Images Helloworld" \
35+
io.openshift.tags="test-test-images-helloworld"
536

6-
ENTRYPOINT ["/ko-app/helloworld"]
37+
ENTRYPOINT ["/ko-app/helloworld"]
Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
1-
# Do not edit! This file was generated via Makefile
2-
FROM openshift/origin-base
1+
# DO NOT EDIT! Generated Dockerfile for vendor/knative.dev/serving/test/test_images/multicontainer/servingcontainer.
2+
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.24-openshift-4.20
3+
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal
4+
5+
FROM $GO_BUILDER as builder
6+
7+
WORKDIR /workspace
8+
COPY . .
9+
10+
ENV CGO_ENABLED=1
11+
ENV GOEXPERIMENT=strictfipsruntime
12+
ENV GOFLAGS=''
13+
14+
RUN go build -tags strictfipsruntime -o /usr/bin/main knative.dev/serving/test/test_images/multicontainer/servingcontainer
15+
16+
FROM $GO_RUNTIME
17+
18+
ARG VERSION=knative-v1.19
19+
20+
COPY --from=builder /usr/bin/main /ko-app/servingcontainer
21+
COPY LICENSE /licenses/
22+
323
USER 65532
424

5-
ADD servingcontainer /ko-app/servingcontainer
25+
LABEL \
26+
com.redhat.component="openshift-serverless-1-client-vendor-knative.dev-serving-test-test-images-multicontainer-servingcontainer-rhel8-container" \
27+
name="openshift-serverless-1/client-vendor-knative.dev-serving-test-test-images-multicontainer-servingcontainer-rhel8" \
28+
version=$VERSION \
29+
summary="Red Hat OpenShift Serverless 1 Client Vendor Knative.Dev Serving Test Test Images Multicontainer Servingcontainer" \
30+
maintainer="[email protected]" \
31+
description="Red Hat OpenShift Serverless 1 Client Vendor Knative.Dev Serving Test Test Images Multicontainer Servingcontainer" \
32+
io.k8s.display-name="Red Hat OpenShift Serverless 1 Client Vendor Knative.Dev Serving Test Test Images Multicontainer Servingcontainer" \
33+
io.k8s.description="Red Hat OpenShift Serverless Client Vendor Knative.Dev Serving Test Test Images Multicontainer Servingcontainer" \
34+
io.openshift.tags="vendor-knative.dev-serving-test-test-images-multicontainer-servingcontainer"
35+
636
ENTRYPOINT ["/ko-app/servingcontainer"]
Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
1-
# Do not edit! This file was generated via Makefile
2-
FROM openshift/origin-base
1+
# DO NOT EDIT! Generated Dockerfile for vendor/knative.dev/serving/test/test_images/multicontainer/sidecarcontainer.
2+
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.24-openshift-4.20
3+
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal
4+
5+
FROM $GO_BUILDER as builder
6+
7+
WORKDIR /workspace
8+
COPY . .
9+
10+
ENV CGO_ENABLED=1
11+
ENV GOEXPERIMENT=strictfipsruntime
12+
ENV GOFLAGS=''
13+
14+
RUN go build -tags strictfipsruntime -o /usr/bin/main knative.dev/serving/test/test_images/multicontainer/sidecarcontainer
15+
16+
FROM $GO_RUNTIME
17+
18+
ARG VERSION=knative-v1.19
19+
20+
COPY --from=builder /usr/bin/main /ko-app/sidecarcontainer
21+
COPY LICENSE /licenses/
22+
323
USER 65532
424

5-
ADD sidecarcontainer /ko-app/sidecarcontainer
25+
LABEL \
26+
com.redhat.component="openshift-serverless-1-client-vendor-knative.dev-serving-test-test-images-multicontainer-sidecarcontainer-rhel8-container" \
27+
name="openshift-serverless-1/client-vendor-knative.dev-serving-test-test-images-multicontainer-sidecarcontainer-rhel8" \
28+
version=$VERSION \
29+
summary="Red Hat OpenShift Serverless 1 Client Vendor Knative.Dev Serving Test Test Images Multicontainer Sidecarcontainer" \
30+
maintainer="[email protected]" \
31+
description="Red Hat OpenShift Serverless 1 Client Vendor Knative.Dev Serving Test Test Images Multicontainer Sidecarcontainer" \
32+
io.k8s.display-name="Red Hat OpenShift Serverless 1 Client Vendor Knative.Dev Serving Test Test Images Multicontainer Sidecarcontainer" \
33+
io.k8s.description="Red Hat OpenShift Serverless Client Vendor Knative.Dev Serving Test Test Images Multicontainer Sidecarcontainer" \
34+
io.openshift.tags="vendor-knative.dev-serving-test-test-images-multicontainer-sidecarcontainer"
35+
636
ENTRYPOINT ["/ko-app/sidecarcontainer"]
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# DO NOT EDIT! Generated Dockerfile.
2+
3+
FROM src
4+
5+
RUN chmod +x vendor/k8s.io/code-generator/generate-groups.sh || true
6+
RUN chmod +x vendor/knative.dev/pkg/hack/generate-knative.sh || true
7+
RUN chmod +x vendor/k8s.io/code-generator/generate-internal-groups.sh || true

openshift/generate.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/usr/bin/env bash
2+
#
3+
# This script generates the productized Dockerfiles
4+
#
5+
6+
set -o errexit
7+
set -o nounset
8+
set -o pipefail
9+
10+
repo_root_dir=$(dirname "$(realpath "${BASH_SOURCE[0]}")")/..
11+
12+
# --app-file-fmt is used to mimic ko build, it's assumed in --cmd flag tests
13+
GOFLAGS='' go run github.com/openshift-knative/hack/cmd/generate@latest \
14+
--root-dir "${repo_root_dir}" \
15+
--generators dockerfile \
16+
--excludes ".*k8s\\.io.*" \
17+
--excludes ".*knative.dev/pkg/codegen.*" \
18+
--excludes ".*knative.dev/hack/cmd/script.*" \
19+
--app-file-fmt "/ko-app/%s"
20+
21+
#git apply $repo_root_dir/openshift/dockerfile.patch
22+
FUNC_UTIL=$(skopeo inspect -n --format '{{.Digest}}' docker://quay.io/redhat-user-workloads/ocp-serverless-tenant/serverless-operator-137/kn-plugin-func-func-util:latest --override-os linux --override-arch amd64)
23+
EVENT_SENDER=$(skopeo inspect -n --format '{{.Digest}}' docker://quay.io/redhat-user-workloads/ocp-serverless-tenant/serverless-operator-137/kn-plugin-event-sender:latest --override-os linux --override-arch amd64)
24+
25+
echo "func-util sha: ${FUNC_UTIL}"
26+
echo "event-sender sha: ${EVENT_SENDER}"
27+
28+
sed -i "/RUN go build.*/ i \
29+
ENV KN_PLUGIN_FUNC_UTIL_IMAGE=registry.redhat.io/openshift-serverless-1/kn-plugin-func-func-util-rhel8@${FUNC_UTIL}\n\
30+
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 commit comments

Comments
 (0)