Relay input meta files to output meta folders

This commit is contained in:
Dan Hawkins 2021-12-11 16:30:20 +00:00
commit f98f9e9565
2 changed files with 14 additions and 1 deletions

View file

@ -6,7 +6,8 @@ enum Store {
this.JENKINS = Store.JENKINS
this.ARTIFACTSERVER = Store.JENKINS
def archive(artifactlist, Store store = JENKINS ) {
def archive(meta, artifactlist, Store store = JENKINS ) {
meta.copyrelatedmeta()
if (store == JENKINS) {
archiveArtifacts(artifactlist)
}

View file

@ -795,6 +795,18 @@ class MetaInfo extends GISJsonSerialised {
return mi
}
def copyrelatedmeta() {
for (relatedmetainfo in associatedmeta) {
def srcpath = "${relatedmetainfo.offsetpath}/${METAFOLDERNAME}"
def destpath = "${METAFOLDERNAME}/${relatedmetainfo.offsetpath}"
script.echo("Copying related meta folder: ${srcpath} to meta output folder: ${destpath} recursively")
fileOperations([
folderCreateOperation(folderPath: destpath),
folderCopyOperation(sourceFolderPath: srcpath, destinationFolderPath: destpath)
])
}
}
LinkedHashMap serialisationdata() {
def data = [