diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 23403b2..186471b 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -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') } } } @@ -51,7 +55,7 @@ pipeline { // deleteDir() // unstash 'source' // dir("${BASE_DIR}"){ - // withMageEnv(){ + // withMageEnv(version: "${env.GO_VERSION}"){ // sh(label: 'Build', script: 'mage -v check') // } // }