Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Properly set Go version in CI. #20

Merged
merged 4 commits into from
Jun 7, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,18 @@ pipeline {
gitCheckout(basedir: "${BASE_DIR}", githubNotifyFirstTimeContributor: true)
pipelineManager([ cancelPreviousRunningBuilds: [ when: 'PR' ] ])
stash allowEmpty: true, name: 'source', useDefaultExcludes: false
dir("${BASE_DIR}"){
setEnvVar('GO_VERSION', readFile(".go-version").trim())
}
}
}
stage('Lint'){
steps {
withGithubNotify(context: "Lint") {
dir("${BASE_DIR}"){
withMageEnv(){
sh(label: 'Check', script: 'mage -v check')
withMageEnv(version: "${env.GO_VERSION}"){
cmd(label: 'mage notice', script: 'mage notice')
cmd(label: 'mage check', script: 'mage -v check')
}
}
}
Expand All @@ -51,7 +55,7 @@ pipeline {
// deleteDir()
// unstash 'source'
// dir("${BASE_DIR}"){
// withMageEnv(){
// withMageEnv(version: "${env.GO_VERSION}"){
// sh(label: 'Build', script: 'mage -v check')
// }
// }
Expand Down