|
| 1 | +# Konflux bundle image build. Unlike the auto-generated bundle.Dockerfile (used |
| 2 | +# for local dev with operator-sdk), this runs bundle-hack/update_bundle.sh to |
| 3 | +# patch digest-pinned image references into the CSV at build time. |
| 4 | +ARG |
| 5 | +FROM registry.access.redhat.com/ubi9/ubi-minimal:latest AS builder-runner |
| 6 | +RUN microdnf install -y tar gzip && \ |
| 7 | + curl -sL https://github.com/mikefarah/yq/releases/download/v4.44.1/yq_linux_amd64.tar.gz | tar xz && \ |
| 8 | + mv yq_linux_amd64 /usr/bin/yq |
| 9 | + |
| 10 | +FROM builder-runner AS builder |
| 11 | +# Hack to set the operator container image in the deployment |
| 12 | +COPY bundle-hack . |
| 13 | +COPY bundle/manifests /manifests/ |
| 14 | + |
| 15 | +RUN ./update_bundle.sh |
| 16 | + |
| 17 | +FROM scratch |
| 18 | + |
| 19 | +# Core bundle labels. |
| 20 | +LABEL operators.operatorframework.io.bundle.mediatype.v1=registry+v1 |
| 21 | +LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/ |
| 22 | +LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/ |
| 23 | +LABEL operators.operatorframework.io.bundle.package.v1=hyperfleet-operator |
| 24 | +LABEL operators.operatorframework.io.bundle.channels.v1=stable,alpha |
| 25 | +LABEL operators.operatorframework.io.bundle.channel.default.v1=stable |
| 26 | +LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.42.3 |
| 27 | +LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1 |
| 28 | +LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v4 |
| 29 | + |
| 30 | +# Labels for testing. |
| 31 | +LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1 |
| 32 | +LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/ |
| 33 | + |
| 34 | +# Copy patched manifests from builder, metadata and tests from source. |
| 35 | +COPY --from=builder /manifests /manifests/ |
| 36 | +COPY bundle/metadata /metadata/ |
| 37 | +COPY bundle/tests/scorecard /tests/scorecard/ |
0 commit comments