|
1 | 1 | ##### UNCOMMENT NEXT BLOCK OF CODE ONCE IMAGE SUBSTITUTION IS CLARIFIED:
|
2 |
| -# FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.22 as builder |
| 2 | + FROM brew.registry.redhat.io/rh-osbs/openshift-golang-builder:rhel_9_1.22 as builder |
3 | 3 | #
|
4 | 4 | # TODO: Set image to correct version
|
5 |
| -# ARG IMG=quay.io/sec-eng-special/nbde-tang-server:v1.1.0 |
6 |
| -# ARG ORIGINAL_IMG=quay.io/sec-eng-special/nbde-tang-server:v1.1.0 |
7 |
| -# WORKDIR /code |
8 |
| -# COPY ./ ./ |
| 5 | +ARG IMG=registry.redhat.io/nbde-tang-server/tang-rhel9-operator@sha256:562e5f1677dbf5cd9feb00a7270e78c57b28f5177a7bf4bd2d39b2a5cd451da8 |
| 6 | +ARG ORIGINAL_IMG=quay.io/sec-eng-special/nbde-tang-server:v1.1.0 |
| 7 | +WORKDIR /code |
| 8 | +COPY ./ ./ |
9 | 9 | #
|
10 |
| -# RUN echo "SNAPSHOT=${SNAPSHOT}" |
11 |
| -# RUN bash -c printenv |
12 |
| -# RUN echo "IMAGE_VERSION=$(echo '${SNAPSHOT}' | base64 -d | jq -r '.components[].containerImage')" |
13 |
| -# Replace the bundle image in the repository with the one specified by the IMG build argument. |
14 |
| -# TODO: Replace bundle appropriately once image is changed |
15 |
| -# RUN chmod -R g+rwX ./ && find bundle/ && find bundle -type f -exec sed -i \ |
16 |
| -# "s|${ORIGINAL_IMG}|$(echo '${SNAPSHOT}' | base64 -d | jq -r '.components[].containerImage')|g" {} \+; \ |
17 |
| -# grep -rq "${ORIGINAL_IMG}" bundle/ && \ |
18 |
| -# { echo "Failed to replace image references"; exit 1; } || echo "Image references replaced" && \ |
19 |
| -# grep -r "${IMG}" bundle/ |
| 10 | +RUN echo "SNAPSHOT=${SNAPSHOT}" |
| 11 | +RUN bash -c printenv |
| 12 | +# Replace the bundle image in the repository with the one specified by the IMG build argument. |
| 13 | +# TODO: Replace bundle appropriately once image is changed |
| 14 | +RUN chmod -R g+rwX ./ && find bundle/ && find bundle -type f -exec sed -i \ |
| 15 | + "s|${ORIGINAL_IMG}|${IMG})|g" {} \+; grep -rq "${ORIGINAL_IMG}" bundle/ && \ |
| 16 | + { echo "Failed to replace image references"; exit 1; } || echo "Image references replaced" && \ |
| 17 | + grep -r "${IMG}" bundle/ |
20 | 18 |
|
21 | 19 | FROM registry.access.redhat.com/ubi9/ubi-micro@sha256:7f376b75faf8ea546f28f8529c37d24adcde33dca4103f4897ae19a43d58192b
|
22 | 20 |
|
@@ -49,12 +47,12 @@ LABEL operators.operatorframework.io.test.mediatype.v1=scorecard+v1
|
49 | 47 | LABEL operators.operatorframework.io.test.config.v1=tests/scorecard/
|
50 | 48 |
|
51 | 49 | ### Copy files to locations specified by labels
|
52 |
| -# COPY --from=builder /code/bundle/manifests /manifests/ |
53 |
| -# COPY --from=builder /code/bundle/metadata /metadata/ |
54 |
| -# COPY --from=builder /code/bundle/tests/scorecard /tests/scorecard/ |
55 |
| -COPY bundle/manifests /manifests/ |
56 |
| -COPY bundle/metadata /metadata/ |
57 |
| -COPY bundle/tests/scorecard /tests/scorecard/ |
| 50 | +COPY --from=builder /code/bundle/manifests /manifests/ |
| 51 | +COPY --from=builder /code/bundle/metadata /metadata/ |
| 52 | +COPY --from=builder /code/bundle/tests/scorecard /tests/scorecard/ |
| 53 | +#COPY bundle/manifests /manifests/ |
| 54 | +#COPY bundle/metadata /metadata/ |
| 55 | +#COPY bundle/tests/scorecard /tests/scorecard/ |
58 | 56 |
|
59 | 57 | # Copy LICENSE to /licenses directory
|
60 | 58 | COPY LICENSE /licenses/
|
0 commit comments