You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the same (recent) Go version for all Kubernetes versions can
break for older versions when there are incompatible changes in Go. To
avoid that, we use exactly the minimum version of Go required for each
Kubernetes version. This is based on the assumption that this
combination was tested successfully.
When building the E2E suite from Kubernetes (the default) we do the
same, but still allow building it from elsewhere.
We allow the Go version to be empty when it doesn't matter.
Copy file name to clipboardExpand all lines: prow.sh
+22-5
Original file line number
Diff line number
Diff line change
@@ -60,8 +60,7 @@ go_from_travis_yml () {
60
60
grep "^ *- go:""${RELEASE_TOOLS_ROOT}/travis.yml"| sed -e 's/.*go: *//'
61
61
}
62
62
configvar CSI_PROW_GO_VERSION_BUILD "$(go_from_travis_yml)""Go version for building the component"# depends on component's source code
63
-
configvar CSI_PROW_GO_VERSION_K8S 1.12.1 "Go version for building Kubernetes for the test cluster"# depends on Kubernetes version
64
-
configvar CSI_PROW_GO_VERSION_E2E 1.12.1 "Go version for building the Kubernetes E2E test suite"# depends on CSI_PROW_E2E settings below
63
+
configvar CSI_PROW_GO_VERSION_E2E """override Go version for building the Kubernetes E2E test suite"# normally doesn't need to be set, see install_e2e
65
64
configvar CSI_PROW_GO_VERSION_SANITY "${CSI_PROW_GO_VERSION_BUILD}""Go version for building the csi-sanity test suite"# depends on CSI_PROW_SANITY settings below
66
65
configvar CSI_PROW_GO_VERSION_KIND "${CSI_PROW_GO_VERSION_BUILD}""Go version for building 'kind'"# depends on CSI_PROW_KIND_VERSION below
67
66
configvar CSI_PROW_GO_VERSION_GINKGO "${CSI_PROW_GO_VERSION_BUILD}""Go version for building ginkgo"# depends on CSI_PROW_GINKGO_VERSION below
@@ -292,12 +291,14 @@ mkdir -p "${CSI_PROW_BIN}"
292
291
PATH="${CSI_PROW_BIN}:$PATH"
293
292
294
293
# Ensure that PATH has the desired version of the Go tools, then run command given as argument.
294
+
# Empty parameter uses the already installed Go. In Prow, that version is kept up-to-date by
295
+
# bumping the container image regularly.
295
296
run_with_go () {
296
297
local version
297
298
version="$1"
298
299
shift
299
300
300
-
if go version 2>/dev/null | grep -q "go$version";then
0 commit comments