From f98f9e9565dc0d5e4e486b105c0903ebf9e10cc2 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Sat, 11 Dec 2021 16:30:20 +0000 Subject: [PATCH] Relay input meta files to output meta folders --- artifacts/archiver.groovy | 3 ++- meta/folder.groovy | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/artifacts/archiver.groovy b/artifacts/archiver.groovy index d7b69d0..0ac3a72 100644 --- a/artifacts/archiver.groovy +++ b/artifacts/archiver.groovy @@ -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) } diff --git a/meta/folder.groovy b/meta/folder.groovy index d3b17c4..d1cec10 100644 --- a/meta/folder.groovy +++ b/meta/folder.groovy @@ -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 = [