Add artifact saveing
This commit is contained in:
parent
6573134d26
commit
40d7d39f19
@ -12,7 +12,7 @@ Map defaults = [
|
|||||||
def call(Map config = [:]) {
|
def call(Map config = [:]) {
|
||||||
Map runConfig = defaults + config
|
Map runConfig = defaults + config
|
||||||
if (runConfig.saveArtifacts) {
|
if (runConfig.saveArtifacts) {
|
||||||
assert config.artifacts : 'Error: saveArtifacts is set to true; must specify artifacts!'
|
assert runConfig.artifacts : 'Error: saveArtifacts is set to true; must specify artifacts!'
|
||||||
}
|
}
|
||||||
if ( fileExists(runConfig.buildTest)) {
|
if ( fileExists(runConfig.buildTest)) {
|
||||||
sh """
|
sh """
|
||||||
@ -21,4 +21,8 @@ def call(Map config = [:]) {
|
|||||||
} else {
|
} else {
|
||||||
error("ERROR: File ${runConfig.buildTest} does not exist in workspace.")
|
error("ERROR: File ${runConfig.buildTest} does not exist in workspace.")
|
||||||
}
|
}
|
||||||
|
if (runConfig.saveArtifacts) {
|
||||||
|
artifactsList = runConfig.artifacts.inspect()
|
||||||
|
archiveArtifacts artifacts: artifactsList, followSymlinks: false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user