Add artifact saveing
This commit is contained in:
parent
6573134d26
commit
40d7d39f19
@ -12,7 +12,7 @@ Map defaults = [
|
||||
def call(Map config = [:]) {
|
||||
Map runConfig = defaults + config
|
||||
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)) {
|
||||
sh """
|
||||
@ -21,4 +21,8 @@ def call(Map config = [:]) {
|
||||
} else {
|
||||
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