From f821da79d81ee32c13f98d60210f76e09c4bb772 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 12:38:49 +0000 Subject: [PATCH 01/15] CORE-594 - Debug installer creation --- import/importer.groovy | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/import/importer.groovy b/import/importer.groovy index bb0d32e..8df88e1 100644 --- a/import/importer.groovy +++ b/import/importer.groovy @@ -45,6 +45,10 @@ class ImportOptions { m_appendtoparentmeta = appendtoparentmeta } + void show() { + script.echo(this.toString()) + } + void setsourceselect(String sourceselect) { sourceselect = sourceselect.trim() switch (sourceselect) { @@ -263,6 +267,7 @@ def artifactimportfromrepo(meta, ImportOptions importoptions, String destpath) { } def artifactimport(meta, ImportOptions importoptions, String destpath) { + importoptions.show() switch (importoptions.m_sourceselect) { case 'Jenkins job artifact': case 'Jenkins job artefact': From cfcdf5c827e9614001893376e96dc7e6f9c441a8 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 12:40:52 +0000 Subject: [PATCH 02/15] CORE-594 - Debug installer creation --- import/importer.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import/importer.groovy b/import/importer.groovy index 8df88e1..8bc96a3 100644 --- a/import/importer.groovy +++ b/import/importer.groovy @@ -46,7 +46,7 @@ class ImportOptions { } void show() { - script.echo(this.toString()) + m_script.echo(this.toString()) } void setsourceselect(String sourceselect) { From 5b3f7a7226ba252489459f8b74f767491f00e5ae Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 13:03:32 +0000 Subject: [PATCH 03/15] CORE-594 - Debug installer creation --- import/importer.groovy | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/import/importer.groovy b/import/importer.groovy index 8bc96a3..2f7611e 100644 --- a/import/importer.groovy +++ b/import/importer.groovy @@ -45,8 +45,22 @@ class ImportOptions { m_appendtoparentmeta = appendtoparentmeta } - void show() { - m_script.echo(this.toString()) + String show() { + return """m_incrementversionnumber: ${m_incrementversionnumber} + m_filter: ${m_filter} + m_excludes: ${m_excludes} + m_fingerprint: ${m_fingerprint} + m_nested: ${m_nested} + m_flatten: ${m_flatten} + m_includemetainfilter: ${m_includemetainfilter} + m_clean: ${m_clean} + m_appendtoparentmeta: ${m_appendtoparentmeta} + m_sourceselect: ${m_sourceselect} + m_jobname: ${m_jobname} + m_buildnumberorselector: ${m_buildnumberorselector} + m_repo: ${m_repo} + m_revision: ${m_revision} + """ } void setsourceselect(String sourceselect) { @@ -267,7 +281,7 @@ def artifactimportfromrepo(meta, ImportOptions importoptions, String destpath) { } def artifactimport(meta, ImportOptions importoptions, String destpath) { - importoptions.show() + echo "Importing artifacts: Import options:\n${importoptions.show()}\n to: ${destpath}" switch (importoptions.m_sourceselect) { case 'Jenkins job artifact': case 'Jenkins job artefact': From a1c2d3b336a64e7bfa71e45381b74e78ea3b07f3 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 13:35:50 +0000 Subject: [PATCH 04/15] CORE-594 - Debug installer creation --- import/importer.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import/importer.groovy b/import/importer.groovy index 2f7611e..af40c5f 100644 --- a/import/importer.groovy +++ b/import/importer.groovy @@ -127,7 +127,7 @@ class ImportOptions { m_jobname = jobname.trim() m_buildnumberorselector = [ $class: 'ParameterizedBuildSelector', - parameterName: "${buildnumberorselector}" + parameterName: "${buildnumberorselector}" ] setsourceselect('Jenkins job artifact') } From 36ed63e11b8a994ce8fefe0b8b903f25765e5814 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 13:39:13 +0000 Subject: [PATCH 05/15] CORE-594 - Debug installer creation --- import/importer.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/import/importer.groovy b/import/importer.groovy index af40c5f..b2dc41b 100644 --- a/import/importer.groovy +++ b/import/importer.groovy @@ -114,7 +114,7 @@ class ImportOptions { m_appendtoparentmeta = appendtoparentmeta } - void jenkinsjob(String jobname, buildnumberorselector) { + void jenkinsjob(String jobname, String buildnumberorselector) { m_jobname = jobname.trim() m_buildnumberorselector = [ $class: 'ParameterizedBuildSelector', From 945f83759dfb6817275abed13480f3ff18c51675 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 14:16:27 +0000 Subject: [PATCH 06/15] CORE-594 - Debug installer creation --- import/importer.groovy | 10 ++++++++-- install/installhelper.groovy | 1 + 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/import/importer.groovy b/import/importer.groovy index b2dc41b..d6fb4d4 100644 --- a/import/importer.groovy +++ b/import/importer.groovy @@ -20,6 +20,8 @@ class ImportOptions { String m_repo String m_revision + + boolean m_showdetails ImportOptions(script, String sourceselect = 'Jenkins job artifact', @@ -31,7 +33,8 @@ class ImportOptions { boolean flatten = false, boolean includemetainfilter = true, boolean clean = true, - appendtoparentmeta = true) { + appendtoparentmeta = true, + show = false) { m_script = script m_sourceselect = sourceselect.trim() m_incrementversionnumber = incrementversionnumber @@ -43,6 +46,7 @@ class ImportOptions { m_includemetainfilter = includemetainfilter m_clean = clean m_appendtoparentmeta = appendtoparentmeta + m_showdetails = show } String show() { @@ -281,7 +285,9 @@ def artifactimportfromrepo(meta, ImportOptions importoptions, String destpath) { } def artifactimport(meta, ImportOptions importoptions, String destpath) { - echo "Importing artifacts: Import options:\n${importoptions.show()}\n to: ${destpath}" + if (importoptions.m_show) { + echo "Importing artifacts:\nImport options:\n${importoptions.show()}\nto: ${destpath}" + } switch (importoptions.m_sourceselect) { case 'Jenkins job artifact': case 'Jenkins job artefact': diff --git a/install/installhelper.groovy b/install/installhelper.groovy index 96a8b2e..2915d0c 100644 --- a/install/installhelper.groovy +++ b/install/installhelper.groovy @@ -26,6 +26,7 @@ def copyToFinalPosition(String pathToIntermediate, String finalBaseFolder, Strin def Map artifactsImporter(meta, importer, artifactDetails, installerDetails) { artifactFetched = [:] + echo ("artifactDetails:\n${artifactDetails}\ninstallerDetails:\n${installerDetails}") def importoptions = importer.getNewImportOptions() for (installer in toBuild) { def artifactKeys = installerDetails.get(installer)[1] From d70f63344e8faef8448b5267eca6093bde946145 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 14:21:53 +0000 Subject: [PATCH 07/15] CORE-594 - Debug installer creation --- import/importer.groovy | 10 +++++++--- install/installhelper.groovy | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/import/importer.groovy b/import/importer.groovy index d6fb4d4..4948cad 100644 --- a/import/importer.groovy +++ b/import/importer.groovy @@ -34,7 +34,7 @@ class ImportOptions { boolean includemetainfilter = true, boolean clean = true, appendtoparentmeta = true, - show = false) { + showdetails = false) { m_script = script m_sourceselect = sourceselect.trim() m_incrementversionnumber = incrementversionnumber @@ -46,7 +46,7 @@ class ImportOptions { m_includemetainfilter = includemetainfilter m_clean = clean m_appendtoparentmeta = appendtoparentmeta - m_showdetails = show + m_showdetails = showdetails } String show() { @@ -147,6 +147,10 @@ class ImportOptions { releaserepo(repo, revision) setsourceselect(sourceselect) } + + void showdetails(boolean showdetails) { + m_showdetails = showdetails + } } ImportOptions getNewImportOptions() { @@ -285,7 +289,7 @@ def artifactimportfromrepo(meta, ImportOptions importoptions, String destpath) { } def artifactimport(meta, ImportOptions importoptions, String destpath) { - if (importoptions.m_show) { + if (importoptions.m_showdetails) { echo "Importing artifacts:\nImport options:\n${importoptions.show()}\nto: ${destpath}" } switch (importoptions.m_sourceselect) { diff --git a/install/installhelper.groovy b/install/installhelper.groovy index 2915d0c..9c11499 100644 --- a/install/installhelper.groovy +++ b/install/installhelper.groovy @@ -23,11 +23,12 @@ def copyToFinalPosition(String pathToIntermediate, String finalBaseFolder, Strin } // Given details about artifacts to import and details of installers to build, import artifacts that are required -def Map artifactsImporter(meta, importer, artifactDetails, installerDetails) { +def Map artifactsImporter(meta, importer, artifactDetails, installerDetails, boolean showdetails = false) { artifactFetched = [:] echo ("artifactDetails:\n${artifactDetails}\ninstallerDetails:\n${installerDetails}") def importoptions = importer.getNewImportOptions() + importoptions.showdetails(showdetails) for (installer in toBuild) { def artifactKeys = installerDetails.get(installer)[1] if (artifactKeys instanceof java.lang.String) { From 05a32d03f832828ddca41325ef2b6b9934b2aebc Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 14:29:40 +0000 Subject: [PATCH 08/15] CORE-594 - Debug installer creation --- install/installhelper.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install/installhelper.groovy b/install/installhelper.groovy index 9c11499..214fa84 100644 --- a/install/installhelper.groovy +++ b/install/installhelper.groovy @@ -26,7 +26,9 @@ def copyToFinalPosition(String pathToIntermediate, String finalBaseFolder, Strin def Map artifactsImporter(meta, importer, artifactDetails, installerDetails, boolean showdetails = false) { artifactFetched = [:] - echo ("artifactDetails:\n${artifactDetails}\ninstallerDetails:\n${installerDetails}") + if (showdetails) { + echo ("toBuild:\n${toBuild}\nartifactDetails:\n${artifactDetails}\ninstallerDetails:\n${installerDetails}") + } def importoptions = importer.getNewImportOptions() importoptions.showdetails(showdetails) for (installer in toBuild) { From d2820996984068d8632ff5060ec3fd1c0758a699 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 14:36:22 +0000 Subject: [PATCH 09/15] CORE-594 - Debug installer creation --- install/installhelper.groovy | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install/installhelper.groovy b/install/installhelper.groovy index 214fa84..a637fac 100644 --- a/install/installhelper.groovy +++ b/install/installhelper.groovy @@ -32,10 +32,17 @@ def Map artifactsImporter(meta, importer, artifactDetails, installerDetails, boo def importoptions = importer.getNewImportOptions() importoptions.showdetails(showdetails) for (installer in toBuild) { - def artifactKeys = installerDetails.get(installer)[1] + def installerinfo = installerDetails.get(installer) + if (showdetails) { + echo ("installer:\n${installer}\installerinfo:\n${installerinfo}") + } + def artifactKeys = installerinfo[1] if (artifactKeys instanceof java.lang.String) { artifactKeys = [ artifactKeys ] } + if (showdetails) { + echo ("artifactKeys:\n${artifactKeys}") + } for (artifactKey in artifactKeys) { (sourceProject, sourceselector, destFolder, incrementversionnumber, toCopy, notToCopy, binariesFolders) = artifactDetails.get(artifactKey) if (artifactFetched.get(artifactKey) == null) { From f1987cb9f47afdbdcefdc545567b71d86fee0c9d Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 14:38:48 +0000 Subject: [PATCH 10/15] CORE-594 - Debug installer creation --- install/installhelper.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/installhelper.groovy b/install/installhelper.groovy index a637fac..926775e 100644 --- a/install/installhelper.groovy +++ b/install/installhelper.groovy @@ -34,7 +34,7 @@ def Map artifactsImporter(meta, importer, artifactDetails, installerDetails, boo for (installer in toBuild) { def installerinfo = installerDetails.get(installer) if (showdetails) { - echo ("installer:\n${installer}\installerinfo:\n${installerinfo}") + echo ("installer:\n${installer}\ninstallerinfo:\n${installerinfo}") } def artifactKeys = installerinfo[1] if (artifactKeys instanceof java.lang.String) { From fb721bb774e5a849d316aea9939bb4ddc491fe92 Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 14:44:49 +0000 Subject: [PATCH 11/15] CORE-594 - Debug installer creation --- install/installhelper.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install/installhelper.groovy b/install/installhelper.groovy index 926775e..3a1cd23 100644 --- a/install/installhelper.groovy +++ b/install/installhelper.groovy @@ -44,7 +44,11 @@ def Map artifactsImporter(meta, importer, artifactDetails, installerDetails, boo echo ("artifactKeys:\n${artifactKeys}") } for (artifactKey in artifactKeys) { - (sourceProject, sourceselector, destFolder, incrementversionnumber, toCopy, notToCopy, binariesFolders) = artifactDetails.get(artifactKey) + artifactDetail = artifactDetails.get(artifactKey) + if (showdetails) { + echo ("artifactKey: ${artifactKey}\nartifactDetail:\n${artifactDetail}") + } + (sourceProject, sourceselector, destFolder, incrementversionnumber, toCopy, notToCopy, binariesFolders) = artifactDetail if (artifactFetched.get(artifactKey) == null) { importoptions.jenkinsjob(sourceProject, sourceselector) importoptions.setincrementversionnumber(incrementversionnumber) From eda480161f3b55b34ed217607eaf978fd5b425df Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 15:12:47 +0000 Subject: [PATCH 12/15] CORE-594 - Debug installer creation --- install/installhelper.groovy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/installhelper.groovy b/install/installhelper.groovy index 3a1cd23..77b917c 100644 --- a/install/installhelper.groovy +++ b/install/installhelper.groovy @@ -60,6 +60,9 @@ def Map artifactsImporter(meta, importer, artifactDetails, installerDetails, boo } } } + if (showdetails) { + echo ("artifactFetched:\n${artifactFetched}") + } return artifactFetched } From cdd00fdeefd8663a92cf303d3cbc6d4e88ce754d Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 16:28:00 +0000 Subject: [PATCH 13/15] CORE-594 - Debug installer creation --- install/installhelper.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/installhelper.groovy b/install/installhelper.groovy index 77b917c..6763cb1 100644 --- a/install/installhelper.groovy +++ b/install/installhelper.groovy @@ -23,7 +23,7 @@ def copyToFinalPosition(String pathToIntermediate, String finalBaseFolder, Strin } // Given details about artifacts to import and details of installers to build, import artifacts that are required -def Map artifactsImporter(meta, importer, artifactDetails, installerDetails, boolean showdetails = false) { +def Map artifactsImporter(meta, importer, toBuild, artifactDetails, installerDetails, boolean showdetails = false) { artifactFetched = [:] if (showdetails) { From 6a415afe26eaa813ef1a5df891b9cfc52f1ee2ce Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 18:46:33 +0000 Subject: [PATCH 14/15] CORE-594 - Debug installer creation --- install/installhelper.groovy | 1 + 1 file changed, 1 insertion(+) diff --git a/install/installhelper.groovy b/install/installhelper.groovy index 6763cb1..57fe65b 100644 --- a/install/installhelper.groovy +++ b/install/installhelper.groovy @@ -111,6 +111,7 @@ def checkISMfilebackend(String xml) { def checkISMfile(String ISMfile) { echo "Checking ISM file: ${ISMfile}" def xml = readFile(ISMfile) + echo "ISM file xml: ${xml}" (exitcode, message) = checkISMfilebackend(xml) echo message if (exitcode > 0) { From 951032de5a24f774f294d2241e67ad4260b9301a Mon Sep 17 00:00:00 2001 From: Dan Hawkins Date: Thu, 13 Jan 2022 22:17:14 +0000 Subject: [PATCH 15/15] CORE-594 - Debug installer creation --- install/installhelper.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/installhelper.groovy b/install/installhelper.groovy index 57fe65b..8dbf23e 100644 --- a/install/installhelper.groovy +++ b/install/installhelper.groovy @@ -111,7 +111,7 @@ def checkISMfilebackend(String xml) { def checkISMfile(String ISMfile) { echo "Checking ISM file: ${ISMfile}" def xml = readFile(ISMfile) - echo "ISM file xml: ${xml}" + //echo "ISM file xml: ${xml}" (exitcode, message) = checkISMfilebackend(xml) echo message if (exitcode > 0) {