Skip to content

Commit 3a37c5f

Browse files
author
aaguirre
committed
include e2e tests in oc-mirror payload
1 parent 14f93cb commit 3a37c5f

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

Dockerfile.tests-extension

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,7 @@ COPY --from=test-extension-builder \
2828
/usr/bin/
2929

3030
LABEL io.openshift.release.operator=true \
31-
com.redhat.component="oc-mirror-tests-extension" \
31+
com.redhat.component="
32+
33+
-extension" \
3234
description="OTE test extension for oc-mirror"

images/cli/Dockerfile.ci

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,28 @@ WORKDIR /go/src/github.com/openshift/oc-mirror
99
COPY . .
1010
RUN 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 -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+
1229
FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
1330
COPY --from=builder_rhel8 /go/src/github.com/openshift/oc-mirror/bin/oc-mirror /usr/bin/oc-mirror.rhel8
1431
COPY --from=builder_rhel9 /go/src/github.com/openshift/oc-mirror/bin/oc-mirror /usr/bin/oc-mirror
1532
COPY --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

1735
LABEL io.k8s.display-name="oc-mirror" \
1836
io.k8s.description="OpenShift is a platform for developing, building, and deploying containerized applications." \

0 commit comments

Comments
 (0)