Set env for tag and version
This commit is contained in:
parent
1873a535a9
commit
3a5cbb4d4d
@ -13,6 +13,7 @@ void call(Map config = [:], Closure body = { }) {
|
||||
if (runConfig.saveArtifacts) {
|
||||
assert runConfig.artifacts : 'Error: saveArtifacts is set to true; must specify artifacts!'
|
||||
}
|
||||
withEnv(["TAG=${runConfig.gitTag}", "HASH=${runConfig.gitHash}", "VERSION=${version}"]) {
|
||||
if ( fileExists(runConfig.buildRequires)) {
|
||||
sh """
|
||||
${runConfig.buildCmd}
|
||||
@ -20,6 +21,8 @@ void call(Map config = [:], Closure body = { }) {
|
||||
} else {
|
||||
error("ERROR: File ${runConfig.buildRequires} does not exist in workspace.")
|
||||
}
|
||||
body()
|
||||
}
|
||||
if (runConfig.saveArtifacts) {
|
||||
artifactsList = runConfig.artifacts.join(',')
|
||||
archiveArtifacts artifacts: artifactsList, followSymlinks: false
|
||||
|
||||
Loading…
Reference in New Issue
Block a user