Skip to content

Commit

Permalink
Set env variable in the linting stage which already got the mage setup
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Oct 26, 2020
1 parent ea2f814 commit 43b878d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
}
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 43b878d

Please sign in to comment.