Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Dockerfile.e2e
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder
WORKDIR /go/src/github.com/openshift/cluster-capi-operator
COPY . .
RUN go build -mod=vendor -o bin/ginkgo ./vendor/github.com/onsi/ginkgo/v2/ginkgo && \
go test -mod=vendor -c -race -o bin/e2e.test ./e2e

FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
COPY --from=builder /go/src/github.com/openshift/cluster-capi-operator/bin/ginkgo /usr/bin/ginkgo
COPY --from=builder /go/src/github.com/openshift/cluster-capi-operator/bin/e2e.test /usr/bin/e2e.test
COPY hack/test.sh /test.sh
RUN chmod 0755 /test.sh /usr/bin/ginkgo /usr/bin/e2e.test

ENV GINKGO=/usr/bin/ginkgo
ENV TEST_DIRS=/usr/bin/e2e.test
ENV TIMEOUT=120m

USER 65532
ENTRYPOINT ["/test.sh"]
Comment thread
mdbooth marked this conversation as resolved.
4 changes: 2 additions & 2 deletions hack/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ fi

# Use existing value of TEST_DIRS, or $1 if not set. Makes it easier to target suites.
TEST_DIRS=${TEST_DIRS:-$1}
# Use 2nd arg, or 5m.
TIMEOUT=${2:-"5m"}
# Use existing value of $2, otherwise TIMEOUT env, otherwise 5m.
TIMEOUT=${2:-${TIMEOUT:-"5m"}}

OPENSHIFT_CI=${OPENSHIFT_CI:-""}
ARTIFACT_DIR=${ARTIFACT_DIR:-""}
Expand Down