From 9dd966b54087e36a6333ce939201f83ffde5647c Mon Sep 17 00:00:00 2001 From: "zxBCN Pablos_Ceruelo,Victor (IT EDS) EXTERNAL" Date: Mon, 13 Jun 2022 13:56:31 +0000 Subject: [PATCH 1/9] Removes DIL_P doc. --- .../ods/orchestration/scheduler/LeVADocumentScheduler.groovy | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/org/ods/orchestration/scheduler/LeVADocumentScheduler.groovy b/src/org/ods/orchestration/scheduler/LeVADocumentScheduler.groovy index d4daf0980..56ea317b9 100644 --- a/src/org/ods/orchestration/scheduler/LeVADocumentScheduler.groovy +++ b/src/org/ods/orchestration/scheduler/LeVADocumentScheduler.groovy @@ -202,8 +202,7 @@ class LeVADocumentScheduler extends DocGenScheduler { (DocumentType.TIR as String) : ["${DocumentType.TIR}_P"], (DocumentType.OVERALL_TIR as String) : ["${DocumentType.TIR}_P"], (DocumentType.IVR as String) : ["${DocumentType.IVR}_P"], - (DocumentType.OVERALL_IVR as String) : ["${DocumentType.IVR}_P"], - (DocumentType.DIL as String) : ["${DocumentType.DIL}_P"] + (DocumentType.OVERALL_IVR as String) : ["${DocumentType.IVR}_P"] ] ] From 0367847b5b840197848ef4647693cccbc9ea8688 Mon Sep 17 00:00:00 2001 From: "zxBCN Pablos_Ceruelo,Victor (IT EDS) EXTERNAL" Date: Wed, 29 Jun 2022 08:24:14 +0000 Subject: [PATCH 2/9] Trying to log what is being sent to jira --- .../orchestration/usecase/JUnitTestReportsUseCase.groovy | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy b/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy index d4935447c..42ad2f4e6 100644 --- a/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy +++ b/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy @@ -3,8 +3,10 @@ package org.ods.orchestration.usecase import com.cloudbees.groovy.cps.NonCPS import org.ods.orchestration.parser.JUnitParser +import org.ods.services.ServiceRegistry import org.ods.util.IPipelineSteps import org.ods.orchestration.util.Project +import org.ods.util.Logger @SuppressWarnings(['JavaIoPackageAccess', 'EmptyCatchBlock']) class JUnitTestReportsUseCase { @@ -56,7 +58,11 @@ class JUnitTestReportsUseCase { for (def i = 0; i < files.size(); i++) { testResults.add(JUnitParser.parseJUnitXML(files[i].text)) } - return this.combineTestResults(testResults) + Map combinedResult = this.combineTestResults(testResults) + org.ods.util.ILogger logger = ServiceRegistry.instance.get(Logger) + logger.info("parseTestReportFiles: Combined result: ") + logger.info(combinedResult) + return combinedResult } void reportTestReportsFromPathToJenkins(String path) { From 8ae309a3708a65180c00736dee72b144dae17085 Mon Sep 17 00:00:00 2001 From: "zxBCN Pablos_Ceruelo,Victor (IT EDS) EXTERNAL" Date: Wed, 29 Jun 2022 09:32:11 +0000 Subject: [PATCH 3/9] Correct way to log variable. --- src/org/ods/orchestration/Stage.groovy | 7 ++++++- .../orchestration/usecase/JUnitTestReportsUseCase.groovy | 8 +------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/org/ods/orchestration/Stage.groovy b/src/org/ods/orchestration/Stage.groovy index 9fc11fdba..474e10cd3 100644 --- a/src/org/ods/orchestration/Stage.groovy +++ b/src/org/ods/orchestration/Stage.groovy @@ -121,11 +121,16 @@ class Stage { testReportFiles = junit.loadTestReportsFromPath(testReportsUnstashPath) } + + Map testResults = junit.parseTestReportFiles(testReportFiles) + logger.info("getTestResults: testResults: ") + logger.info(testResults) + return [ // Load JUnit test report files from path testReportFiles: testReportFiles, // Parse JUnit test report files into a report - testResults: junit.parseTestReportFiles(testReportFiles), + testResults: testResults, ] } diff --git a/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy b/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy index 42ad2f4e6..d4935447c 100644 --- a/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy +++ b/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy @@ -3,10 +3,8 @@ package org.ods.orchestration.usecase import com.cloudbees.groovy.cps.NonCPS import org.ods.orchestration.parser.JUnitParser -import org.ods.services.ServiceRegistry import org.ods.util.IPipelineSteps import org.ods.orchestration.util.Project -import org.ods.util.Logger @SuppressWarnings(['JavaIoPackageAccess', 'EmptyCatchBlock']) class JUnitTestReportsUseCase { @@ -58,11 +56,7 @@ class JUnitTestReportsUseCase { for (def i = 0; i < files.size(); i++) { testResults.add(JUnitParser.parseJUnitXML(files[i].text)) } - Map combinedResult = this.combineTestResults(testResults) - org.ods.util.ILogger logger = ServiceRegistry.instance.get(Logger) - logger.info("parseTestReportFiles: Combined result: ") - logger.info(combinedResult) - return combinedResult + return this.combineTestResults(testResults) } void reportTestReportsFromPathToJenkins(String path) { From 4bf1a016c07cb9df75cee9b6214306b00c56d607 Mon Sep 17 00:00:00 2001 From: "zxBCN Pablos_Ceruelo,Victor (IT EDS) EXTERNAL" Date: Wed, 29 Jun 2022 09:47:18 +0000 Subject: [PATCH 4/9] Pretty print map using json format. --- src/org/ods/orchestration/Stage.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/org/ods/orchestration/Stage.groovy b/src/org/ods/orchestration/Stage.groovy index 474e10cd3..60186ed0b 100644 --- a/src/org/ods/orchestration/Stage.groovy +++ b/src/org/ods/orchestration/Stage.groovy @@ -1,7 +1,7 @@ package org.ods.orchestration import com.cloudbees.groovy.cps.NonCPS - +import groovy.json.JsonOutput import org.ods.services.ServiceRegistry import org.ods.orchestration.util.Project import org.ods.orchestration.util.PipelineUtil @@ -124,7 +124,7 @@ class Stage { Map testResults = junit.parseTestReportFiles(testReportFiles) logger.info("getTestResults: testResults: ") - logger.info(testResults) + logger.info(JsonOutput.prettyPrint(JsonOutput.toJson(testResults))) return [ // Load JUnit test report files from path From 5e4c2d5219452005607567005771354d678fef9f Mon Sep 17 00:00:00 2001 From: Victor Pablos Ceruelo Date: Thu, 30 Jun 2022 09:33:03 +0200 Subject: [PATCH 5/9] Revert "Correct way to log variable." This reverts commit 8ae309a3708a65180c00736dee72b144dae17085. --- src/org/ods/orchestration/Stage.groovy | 7 +------ .../orchestration/usecase/JUnitTestReportsUseCase.groovy | 8 +++++++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/org/ods/orchestration/Stage.groovy b/src/org/ods/orchestration/Stage.groovy index 474e10cd3..9fc11fdba 100644 --- a/src/org/ods/orchestration/Stage.groovy +++ b/src/org/ods/orchestration/Stage.groovy @@ -121,16 +121,11 @@ class Stage { testReportFiles = junit.loadTestReportsFromPath(testReportsUnstashPath) } - - Map testResults = junit.parseTestReportFiles(testReportFiles) - logger.info("getTestResults: testResults: ") - logger.info(testResults) - return [ // Load JUnit test report files from path testReportFiles: testReportFiles, // Parse JUnit test report files into a report - testResults: testResults, + testResults: junit.parseTestReportFiles(testReportFiles), ] } diff --git a/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy b/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy index d4935447c..42ad2f4e6 100644 --- a/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy +++ b/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy @@ -3,8 +3,10 @@ package org.ods.orchestration.usecase import com.cloudbees.groovy.cps.NonCPS import org.ods.orchestration.parser.JUnitParser +import org.ods.services.ServiceRegistry import org.ods.util.IPipelineSteps import org.ods.orchestration.util.Project +import org.ods.util.Logger @SuppressWarnings(['JavaIoPackageAccess', 'EmptyCatchBlock']) class JUnitTestReportsUseCase { @@ -56,7 +58,11 @@ class JUnitTestReportsUseCase { for (def i = 0; i < files.size(); i++) { testResults.add(JUnitParser.parseJUnitXML(files[i].text)) } - return this.combineTestResults(testResults) + Map combinedResult = this.combineTestResults(testResults) + org.ods.util.ILogger logger = ServiceRegistry.instance.get(Logger) + logger.info("parseTestReportFiles: Combined result: ") + logger.info(combinedResult) + return combinedResult } void reportTestReportsFromPathToJenkins(String path) { From 0e8b78893d7114d5e009961438c7f7ccc9e62438 Mon Sep 17 00:00:00 2001 From: Victor Pablos Ceruelo Date: Thu, 30 Jun 2022 09:34:10 +0200 Subject: [PATCH 6/9] Revert "Trying to log what is being sent to jira" This reverts commit 0367847b5b840197848ef4647693cccbc9ea8688. --- .../orchestration/usecase/JUnitTestReportsUseCase.groovy | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy b/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy index 42ad2f4e6..d4935447c 100644 --- a/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy +++ b/src/org/ods/orchestration/usecase/JUnitTestReportsUseCase.groovy @@ -3,10 +3,8 @@ package org.ods.orchestration.usecase import com.cloudbees.groovy.cps.NonCPS import org.ods.orchestration.parser.JUnitParser -import org.ods.services.ServiceRegistry import org.ods.util.IPipelineSteps import org.ods.orchestration.util.Project -import org.ods.util.Logger @SuppressWarnings(['JavaIoPackageAccess', 'EmptyCatchBlock']) class JUnitTestReportsUseCase { @@ -58,11 +56,7 @@ class JUnitTestReportsUseCase { for (def i = 0; i < files.size(); i++) { testResults.add(JUnitParser.parseJUnitXML(files[i].text)) } - Map combinedResult = this.combineTestResults(testResults) - org.ods.util.ILogger logger = ServiceRegistry.instance.get(Logger) - logger.info("parseTestReportFiles: Combined result: ") - logger.info(combinedResult) - return combinedResult + return this.combineTestResults(testResults) } void reportTestReportsFromPathToJenkins(String path) { From 6e63977aef33a1abc4eb8c05c406ef9c051505ce Mon Sep 17 00:00:00 2001 From: Victor Pablos Ceruelo Date: Thu, 30 Jun 2022 12:50:37 +0200 Subject: [PATCH 7/9] jcenter is no more available. --- build.gradle | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.gradle b/build.gradle index fa984ce68..58ee6f6fc 100644 --- a/build.gradle +++ b/build.gradle @@ -18,7 +18,7 @@ repositories { if (no_nexus) { println("using repositories 'jcenter' and 'mavenCentral'") mavenLocal() - jcenter() + // deprecated: jcenter() mavenCentral() maven { url "https://repo1.maven.org/maven2/" @@ -46,7 +46,7 @@ repositories { url repoUrl } } - nexusMaven("${nexus_url}/repository/jcenter/") + // deprecated: nexusMaven("${nexus_url}/repository/jcenter/") nexusMaven("${nexus_url}/repository/maven-public/") nexusMaven("${nexus_url}/repository/atlassian_public/") nexusMaven("${nexus_url}/repository/jenkins-ci-releases/") @@ -82,7 +82,7 @@ dependencies { testImplementation ("com.athaydes:spock-reports:1.6.3") { transitive = false } testImplementation group: 'org.assertj', name: 'assertj-core', version: '3.21.0' testImplementation group: 'commons-io', name: 'commons-io', version: '2.8.0' - testImplementation "com.lesfurets:jenkins-pipeline-unit:1.9" + testImplementation group: 'com.lesfurets', name: 'jenkins-pipeline-unit', version: '1.9' // "com.lesfurets:jenkins-pipeline-unit:1.9" testImplementation "net.bytebuddy:byte-buddy:1.10.8" testImplementation "org.objenesis:objenesis:3.1" testImplementation "cglib:cglib-nodep:3.3.0" // for mocking classes From fabb4306475e57c30a0a5a597ca64ea51c2f3c9a Mon Sep 17 00:00:00 2001 From: "zxBCN Pablos_Ceruelo,Victor (IT EDS) EXTERNAL" Date: Thu, 30 Jun 2022 13:53:39 +0000 Subject: [PATCH 8/9] Removes from test checking that DIL_P is generated. --- .../orchestration/scheduler/LeVADocumentSchedulerSpec.groovy | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/groovy/org/ods/orchestration/scheduler/LeVADocumentSchedulerSpec.groovy b/test/groovy/org/ods/orchestration/scheduler/LeVADocumentSchedulerSpec.groovy index 6ee397825..0a69685a8 100644 --- a/test/groovy/org/ods/orchestration/scheduler/LeVADocumentSchedulerSpec.groovy +++ b/test/groovy/org/ods/orchestration/scheduler/LeVADocumentSchedulerSpec.groovy @@ -6821,7 +6821,6 @@ class LeVADocumentSchedulerSpec extends SpecHelper { then: 1 * usecase.invokeMethod("createIVR", [[:], data] as Object[]) - 1 * usecase.invokeMethod("createDIL", [[:], data] as Object[]) 0 * usecase.invokeMethod(*_) } @@ -6927,7 +6926,6 @@ class LeVADocumentSchedulerSpec extends SpecHelper { then: 1 * usecase.invokeMethod("createIVR", [[:], data] as Object[]) - 1 * usecase.invokeMethod("createDIL", [[:], data] as Object[]) 0 * usecase.invokeMethod(*_) } @@ -6995,7 +6993,6 @@ class LeVADocumentSchedulerSpec extends SpecHelper { then: 1 * usecase.invokeMethod("createIVR", [[:], data] as Object[]) - 1 * usecase.invokeMethod("createDIL", [[:], data] as Object[]) 0 * usecase.invokeMethod(*_) } From 4d1f016974ef7da335b613ebb03606dd302b07c0 Mon Sep 17 00:00:00 2001 From: "zxBCN Pablos_Ceruelo,Victor (IT EDS) EXTERNAL" Date: Thu, 30 Jun 2022 14:02:33 +0000 Subject: [PATCH 9/9] chengelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86b1514c6..1f7373878 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -86,6 +86,7 @@ - Added default timeout to Aqua stage ([#899](https://github.com/opendevstack/ods-jenkins-shared-library/issues/899)) - Increase default timeout for rollout ([#903](https://github.com/opendevstack/ods-jenkins-shared-library/issues/903)) - Add retry for Openshift image build status ([#901](https://github.com/opendevstack/ods-jenkins-shared-library/issues/901)) +- Removes DIL from the set of docs generated for enviroment P ([914](https://github.com/opendevstack/ods-jenkins-shared-library/pull/914)) ## [3.0] - 2020-08-11