From 718cb6fe45e9273ebd3a0f4b3fe72df4cfc441f5 Mon Sep 17 00:00:00 2001 From: Craig MacKenzie Date: Tue, 7 Jun 2022 08:56:43 -0400 Subject: [PATCH] Properly set Go version in CI (#58) Also make sure the notice file is up to date. --- .ci/Jenkinsfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.ci/Jenkinsfile b/.ci/Jenkinsfile index 982b9223..a0142f34 100644 --- a/.ci/Jenkinsfile +++ b/.ci/Jenkinsfile @@ -30,14 +30,18 @@ pipeline { deleteDir() gitCheckout(basedir: "${BASE_DIR}", githubNotifyFirstTimeContributor: true) 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: 'Mage 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') } } }