Skip to content

Commit cd638fb

Browse files
lentzi90k8s-infra-cherrypick-robot
authored andcommitted
Set GOTOOLCHAIN in Makefile
This avoids issues when the container image used to run the tests have a different go version than what we use. For example, golanci-lint panics if it was built using go1.25 but go1.26 is used to run it. CAPI also does this. Signed-off-by: Lennart Jern <lennart.jern@est.tech>
1 parent e23cefe commit cd638fb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ TRACE ?= 0
2929
# Go
3030
GO_VERSION ?= 1.25.8
3131

32+
# Ensure correct toolchain is used
33+
GOTOOLCHAIN = go$(GO_VERSION)
34+
export GOTOOLCHAIN
35+
3236
# Directories.
3337
ARTIFACTS ?= $(REPO_ROOT)/_artifacts
3438
TOOLS_DIR := hack/tools

0 commit comments

Comments
 (0)