Skip to content

Commit 141a60f

Browse files
committed
Build Ginkgo V2 for kind-detect-local-e2e.sh
Signed-off-by: Dave Chen <[email protected]>
1 parent 4494707 commit 141a60f

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

experiment/kind-detect-local-e2e.sh

+10-2
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,20 @@ signal_handler() {
5454
}
5555
trap signal_handler INT TERM
5656

57-
# build kubernetes / node image, e2e binaries
57+
# build kubernetes / node image, e2e binaries and ginkgo
5858
build() {
5959
# build the node image w/ kubernetes
6060
kind build node-image -v 1
61+
# Ginkgo v1 is used by Kubernetes 1.24 and earlier and exists in the vendor directory.
62+
# Historically it has been built with the "vendor" prefix.
63+
GINKGO_TARGET="vendor/github.com/onsi/ginkgo/ginkgo"
64+
if [ ! -d "$GINKGO_TARGET" ]; then
65+
# If the directory doesn't exist, then we must be on Kubernetes >= 1.25 with Ginkgo V2.
66+
# The "vendor" prefix is no longer needed.
67+
GINKGO_TARGET="github.com/onsi/ginkgo/v2/ginkgo"
68+
fi
6169
# make sure we have e2e requirements
62-
make all WHAT='cmd/kubectl test/e2e/e2e.test vendor/github.com/onsi/ginkgo/ginkgo'
70+
make all WHAT="cmd/kubectl test/e2e/e2e.test ${GINKGO_TARGET}"
6371
}
6472

6573
check_structured_log_support() {

0 commit comments

Comments
 (0)