From 3af6d511259ff0268613d64ecdab445f25ecc86b Mon Sep 17 00:00:00 2001 From: Michelle Au Date: Thu, 18 Jul 2019 14:28:08 -0700 Subject: [PATCH] DO NOT MERGE: get kind fix for Kubernetes master image building --- release-tools/prow.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/release-tools/prow.sh b/release-tools/prow.sh index dcfcec614..73bb40fd5 100755 --- a/release-tools/prow.sh +++ b/release-tools/prow.sh @@ -101,7 +101,7 @@ configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}" "Go version # kind version to use. If the pre-installed version is different, # the desired version is downloaded from https://github.com/kubernetes-sigs/kind/releases/download/ # (if available), otherwise it is built from source. -configvar CSI_PROW_KIND_VERSION v0.4.0 "kind" +configvar CSI_PROW_KIND_VERSION 13052462357bd006f3f25e3c3c88b400d65ba173 "kind" # ginkgo test runner version to use. If the pre-installed version is # different, the desired version is built from source. @@ -380,7 +380,11 @@ install_kind () { chmod u+x "${CSI_PROW_WORK}/bin/kind" else git_checkout https://github.com/kubernetes-sigs/kind "$GOPATH/src/sigs.k8s.io/kind" "${CSI_PROW_KIND_VERSION}" --depth=1 && - run_with_go "${CSI_PROW_GO_VERSION_KIND}" go build -o "${CSI_PROW_WORK}/bin/kind" sigs.k8s.io/kind + if [ -d "$GOPATH/src/sigs.k8s.io/kind/vendor" ]; then + run_with_go "${CSI_PROW_GO_VERSION_KIND}" go build -o "${CSI_PROW_WORK}/bin/kind" sigs.k8s.io/kind; + else + (cd "$CSI_PROW_WORK/kind" && run_with_go "${CSI_PROW_GO_VERSION_KIND}" go build -o "${CSI_PROW_WORK}/bin/kind" .) + fi fi }