From 43b878dcd45e5e4471ec54dcfcc88f6051dba5f5 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Mon, 26 Oct 2020 13:03:07 +0000 Subject: [PATCH] Set env variable in the linting stage which already got the mage setup --- Jenkinsfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 8e45bd10046..f36a3e50754 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -77,6 +77,7 @@ pipeline { withBeatsEnv(archive: false, id: 'lint') { dumpVariables() cmd(label: 'make check', script: 'make check') + setEnvVar('VERSION', sh(label: 'Get beat version', script: 'make get-version', returnStdout: true)?.trim()) } } } @@ -121,12 +122,9 @@ pipeline { } post { success { - dir("${BASE_DIR}"){ - setEnvVar('VERSION', sh(label: 'Get beat version', script: 'make get-version', returnStdout: true)?.trim()) - } writeFile(file: 'packaging.properties', text: """## To be consumed by the packaging pipeline COMMIT=${env.GIT_BASE_COMMIT} -VERSION=${VERSION}-SNAPSHOT""") +VERSION=${env.VERSION}-SNAPSHOT""") archiveArtifacts artifacts: 'packaging.properties' } always {