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

Commit

Permalink
Merge pull request #20 from cmacknz/fix-jenkins-go-version
Browse files Browse the repository at this point in the history
Properly set Go version in CI.
  • Loading branch information
cmacknz authored Jun 7, 2022
2 parents 69feca1 + 3f3135a commit c42a742
Showing 1 changed file with 7 additions and 3 deletions.
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

0 comments on commit c42a742

Please sign in to comment.