hack: configure Go environments where necessary

These scripts rely on the system's default go; this changes that using
kube::golang::setup_env so that the appropriate go is used when the
system's isn't sufficient.

Signed-off-by: Stephen Kitt <skitt@redhat.com>
This commit is contained in:
Stephen Kitt 2024-09-26 22:47:43 +02:00
parent 5ebd0da6cc
commit 3124a13587
No known key found for this signature in database
GPG Key ID: 1CC5FA453662A71D
3 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,8 @@ set -o pipefail
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
kube::golang::setup_env
cd "${KUBE_ROOT}"
go run test/featuregates_linter/main.go feature-gates verify

View File

@ -28,6 +28,8 @@ KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
source "${KUBE_ROOT}/hack/lib/init.sh"
cd "${KUBE_ROOT}"
kube::golang::setup_env
RELEASE_BIN_PKGS=(
"${KUBE_ROOT}/cmd/cloud-controller-manager"
"${KUBE_ROOT}/cmd/kube-apiserver"

View File

@ -22,5 +22,9 @@ set -o pipefail
KUBE_ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")"/../.. && pwd -P)
cd "${KUBE_ROOT}"
source "${KUBE_ROOT}/hack/lib/init.sh"
kube::golang::setup_env
# convert dumped spec (see dump-spec.sh) to conformance.yaml
go run ./test/conformance/walk.go --source="${KUBE_ROOT}" ./_output/specsummaries.json > ./_output/conformance.yaml