File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ RUN cd tests-extension && \
1414 -pkg testdata -o testdata/bindata.go -prefix "testdata" testdata/... && \
1515 cd ../.. && \
1616 gofmt -s -w test/e2e/testdata/bindata.go && \
17- CGO_ENABLED=0 GO_COMPLIANCE_POLICY="exempt_all" GOTOOLCHAIN=auto go build -mod=vendor -o bin/oc-mirror-tests-ext ./cmd && \
17+ CGO_ENABLED=0 GO_COMPLIANCE_POLICY="exempt_all" GOTOOLCHAIN=auto go build -mod=vendor -p 2 - o bin/oc-mirror-tests-ext ./cmd && \
1818 cd bin && \
1919 tar -czvf oc-mirror-test-extension.tar.gz oc-mirror-tests-ext && \
2020 rm -f oc-mirror-tests-ext
Original file line number Diff line number Diff line change @@ -9,10 +9,28 @@ WORKDIR /go/src/github.com/openshift/oc-mirror
99COPY . .
1010RUN make build
1111
12+ FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS test-extension-builder
13+ WORKDIR /go/src/github.com/openshift/oc-mirror
14+ COPY . .
15+ RUN cd tests-extension && \
16+ GOTOOLCHAIN=auto go mod vendor && \
17+ GOPATH=$(go env GOPATH) && \
18+ GOFLAGS= go install github.com/go-bindata/go-bindata/v3/go-bindata@latest && \
19+ cd test/e2e && \
20+ $GOPATH/bin/go-bindata -nocompress \
21+ -pkg testdata -o testdata/bindata.go -prefix "testdata" testdata/... && \
22+ cd ../.. && \
23+ gofmt -s -w test/e2e/testdata/bindata.go && \
24+ CGO_ENABLED=0 GO_COMPLIANCE_POLICY="exempt_all" GOTOOLCHAIN=auto go build -mod=vendor -p 2 -o bin/oc-mirror-tests-ext ./cmd && \
25+ cd bin && \
26+ tar -czvf oc-mirror-test-extension.tar.gz oc-mirror-tests-ext && \
27+ rm -f oc-mirror-tests-ext
28+
1229FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
1330COPY --from=builder_rhel8 /go/src/github.com/openshift/oc-mirror/bin/oc-mirror /usr/bin/oc-mirror.rhel8
1431COPY --from=builder_rhel9 /go/src/github.com/openshift/oc-mirror/bin/oc-mirror /usr/bin/oc-mirror
1532COPY --from=builder_rhel9 /go/src/github.com/openshift/oc-mirror/bin/oc-mirror /usr/bin/oc-mirror.rhel9
33+ COPY --from=test-extension-builder /go/src/github.com/openshift/oc-mirror/tests-extension/bin/oc-mirror-test-extension.tar.gz /usr/bin/oc-mirror-test-extension.tar.gz
1634
1735LABEL io.k8s.display-name="oc-mirror" \
1836 io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \
You can’t perform that action at this time.
0 commit comments