Return name of package
This commit is contained in:
parent
b931480b1c
commit
2ff2a99368
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
|
|
||||||
void call(Map config = [:], Closure body = { }) {
|
String call(Map config = [:], Closure body = { }) {
|
||||||
Map defaults = [
|
Map defaults = [
|
||||||
name: env.BUILD_TAG,
|
name: env.BUILD_TAG,
|
||||||
archiveCmd: 'tar',
|
archiveCmd: 'tar',
|
||||||
@ -11,6 +11,7 @@ void call(Map config = [:], Closure body = { }) {
|
|||||||
separator: '-',
|
separator: '-',
|
||||||
useHash: false
|
useHash: false
|
||||||
]
|
]
|
||||||
|
archiveName = ''
|
||||||
Map runConfig = defaults + config
|
Map runConfig = defaults + config
|
||||||
stage(runConfig.stepName) {
|
stage(runConfig.stepName) {
|
||||||
printBanner(runConfig.stepName, [ boxStyle : 'plain' ])
|
printBanner(runConfig.stepName, [ boxStyle : 'plain' ])
|
||||||
@ -35,8 +36,13 @@ void call(Map config = [:], Closure body = { }) {
|
|||||||
fi
|
fi
|
||||||
"""
|
"""
|
||||||
archiveArtifacts artifacts: archiveName, followSymlinks: false
|
archiveArtifacts artifacts: archiveName, followSymlinks: false
|
||||||
withEnv(["TAG=${runConfig.tag}", "HASH=${runConfig.hash}", "VERSION=${runConfig.version}"]) {
|
withEnv([
|
||||||
|
"TAG=${runConfig.tag}",
|
||||||
|
"HASH=${runConfig.hash}",
|
||||||
|
"VERSION=${runConfig.version}",
|
||||||
|
"ARCHIVE=${archiveName}"]) {
|
||||||
body()
|
body()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return archiveName
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user