Skip to content

Commit 40e6fb3

Browse files
committed
fix: use the right Go version in the CI
1 parent d6e8cd3 commit 40e6fb3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.ci/Jenkinsfile

+4-3
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,14 @@ pipeline {
3434
deleteDir()
3535
gitCheckout(basedir: "${BASE_DIR}")
3636
stash allowEmpty: true, name: 'source', useDefaultExcludes: false
37+
setEnvVar("GO_VERSION", readFile("${env.WORKSPACE}/${env.BASE_DIR}/.go-version").trim())
3738
}
3839
}
3940
stage('Check') {
4041
options { skipDefaultCheckout() }
4142
steps {
4243
cleanup()
43-
withGoEnv(){
44+
withGoEnv(version: "${GO_VERSION}"){
4445
dir("${BASE_DIR}"){
4546
sh(label: 'check',script: 'make check')
4647
}
@@ -51,7 +52,7 @@ pipeline {
5152
options { skipDefaultCheckout() }
5253
steps {
5354
cleanup()
54-
withGoEnv(){
55+
withGoEnv(version: "${GO_VERSION}"){
5556
dir("${BASE_DIR}"){
5657
sh(label: 'local',script: 'make local')
5758
}
@@ -62,7 +63,7 @@ pipeline {
6263
options { skipDefaultCheckout() }
6364
steps {
6465
cleanup()
65-
withGoEnv(){
66+
withGoEnv(version: "${GO_VERSION}"){
6667
dir("${BASE_DIR}"){
6768
retryWithSleep(retries: 2, seconds: 5, backoff: true){ sh(label: "Install Docker", script: '.ci/scripts/install-docker-compose.sh') }
6869
sh(label: 'test', script: 'make test')

0 commit comments

Comments
 (0)