Skip to content

Commit 718cb6f

Browse files
authored
Properly set Go version in CI (#58)
Also make sure the notice file is up to date.
1 parent ac6538b commit 718cb6f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.ci/Jenkinsfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,18 @@ pipeline {
3030
deleteDir()
3131
gitCheckout(basedir: "${BASE_DIR}", githubNotifyFirstTimeContributor: true)
3232
stash allowEmpty: true, name: 'source', useDefaultExcludes: false
33+
dir("${BASE_DIR}"){
34+
setEnvVar('GO_VERSION', readFile(".go-version").trim())
35+
}
3336
}
3437
}
3538
stage('Lint'){
3639
steps {
3740
withGithubNotify(context: "Lint") {
3841
dir("${BASE_DIR}"){
39-
withMageEnv(){
40-
sh(label: 'Mage check', script: 'mage -v check')
42+
withMageEnv(version: "${env.GO_VERSION}"){
43+
cmd(label: 'Mage notice', script: 'mage notice')
44+
cmd(label: 'Mage check', script: 'mage -v check')
4145
}
4246
}
4347
}

0 commit comments

Comments
 (0)