From 793c9798e82175e460ca52db6c33aa0cb67280be Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Wed, 1 Dec 2021 16:22:50 +0000 Subject: [PATCH 1/2] Remove ACM from Vertical stack (as it is using different versions of Atlas); Import the MCS version that was used to build Atlas UI --- import/importer.groovy | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/import/importer.groovy b/import/importer.groovy index 2562693..d40c52f 100644 --- a/import/importer.groovy +++ b/import/importer.groovy @@ -341,4 +341,25 @@ def artifactimport(meta, return artifactimport(meta, importoptions, destpath) } +// Import the artifacts of a named child component found below parent meta's hierarchy +def artifactimport(meta, parentmeta, String childproduct, String childsubcomponent, importoptions, String destinationfolder) { + // Import from parent meta + def childmeta = meta.getNewMetaObject() + def childmeta2 + echo "Finding meta associated with child: Product: ${childproduct} Sub-component: ${childsubcomponent}" + def findresults = parentmeta.findAssociatedMeta(childproduct, childsubcomponent) + if (findresults.matchfound) { + childmeta = findresults.matchedmeta + if (childmeta.releaseinfo.released) { + importoptions.releaserepo(childmeta.releaseinfo.releaserepoURL, childmeta.releasetag()) + } else { + importoptions.jenkinsjob(childmeta.jenkinsbuildinfo.buildjobname, childmeta.jenkinsbuildinfo.buildnumber) + } + childmeta2 = importer.artifactimport(meta, importoptions, destinationfolder) + } else { + error("Could not find meta associated with child: Product: ${childproduct} Sub-component: ${childsubcomponent}" + } + return childmeta2 +} + return this; From 815a9e9d88098f530fb2a7db4cd67530be0cf17e Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Wed, 1 Dec 2021 16:36:29 +0000 Subject: [PATCH 2/2] Remove ACM from Vertical stack (as it is using different versions of Atlas); Import the MCS version that was used to build Atlas UI --- import/importer.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import/importer.groovy b/import/importer.groovy index d40c52f..0e2ca17 100644 --- a/import/importer.groovy +++ b/import/importer.groovy @@ -357,7 +357,7 @@ def artifactimport(meta, parentmeta, String childproduct, String childsubcompone } childmeta2 = importer.artifactimport(meta, importoptions, destinationfolder) } else { - error("Could not find meta associated with child: Product: ${childproduct} Sub-component: ${childsubcomponent}" + error("Could not find meta associated with child: Product: ${childproduct} Sub-component: ${childsubcomponent}") } return childmeta2 }