Skip to content

Commit 43b878d

Browse files
committed
Set env variable in the linting stage which already got the mage setup
1 parent ea2f814 commit 43b878d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Jenkinsfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ pipeline {
7777
withBeatsEnv(archive: false, id: 'lint') {
7878
dumpVariables()
7979
cmd(label: 'make check', script: 'make check')
80+
setEnvVar('VERSION', sh(label: 'Get beat version', script: 'make get-version', returnStdout: true)?.trim())
8081
}
8182
}
8283
}
@@ -121,12 +122,9 @@ pipeline {
121122
}
122123
post {
123124
success {
124-
dir("${BASE_DIR}"){
125-
setEnvVar('VERSION', sh(label: 'Get beat version', script: 'make get-version', returnStdout: true)?.trim())
126-
}
127125
writeFile(file: 'packaging.properties', text: """## To be consumed by the packaging pipeline
128126
COMMIT=${env.GIT_BASE_COMMIT}
129-
VERSION=${VERSION}-SNAPSHOT""")
127+
VERSION=${env.VERSION}-SNAPSHOT""")
130128
archiveArtifacts artifacts: 'packaging.properties'
131129
}
132130
always {

0 commit comments

Comments
 (0)