Add flatten option to job artifact option

This commit is contained in:
Dan Hawkins 2020-04-13 13:45:52 +01:00
commit 7120ea56ce

View file

@ -25,6 +25,7 @@ class ImportOptions {
String excludes = '',
boolean fingerprint = false,
boolean nested = false,
boolean flatten = false,
appendtoparentmeta = true) {
m_script = script
m_sourceselect = sourceselect.trim()
@ -33,6 +34,7 @@ class ImportOptions {
m_excludes = excludes.trim()
m_fingerprint = fingerprint
m_nested = nested
m_flatten = flatten
m_appendtoparentmeta = appendtoparentmeta
}
@ -71,6 +73,10 @@ class ImportOptions {
m_nested = nested
}
void flattenimports(boolean flatten) {
m_flatten = flatten
}
void setappendtoparentmeta(boolean appendtoparentmeta) {
m_appendtoparentmeta = appendtoparentmeta
}
@ -113,6 +119,7 @@ def artifactimportfrombuildjob(meta, importoptions, String destpath) {
$class: 'ParameterizedBuildSelector',
parameterName: importoptions.m_buildnumberorselector
],
flatten: importoptions.m_flatten,
target: destpath
)
def importedmeta = meta.importrelated(importoptions.m_appendtoparentmeta, destpath)