From f0454a47610c96e5840637a758205a86f3428a39 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 21 Aug 2024 16:33:23 -0400 Subject: [PATCH] Remove old args check on publishIntegTestResults (#489) Signed-off-by: Peter Zhu --- build.gradle | 2 +- vars/publishIntegTestResults.groovy | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index 5af7009d..4fcdc413 100644 --- a/build.gradle +++ b/build.gradle @@ -127,7 +127,7 @@ jacocoTestReport { } } -String version = '6.8.3' +String version = '6.8.4' task updateVersion { doLast { diff --git a/vars/publishIntegTestResults.groovy b/vars/publishIntegTestResults.groovy index bc93a861..092bda5f 100644 --- a/vars/publishIntegTestResults.groovy +++ b/vars/publishIntegTestResults.groovy @@ -26,9 +26,8 @@ void call(Map args = [:]) { def isNullOrEmpty = { str -> str == null || (str instanceof String && str.trim().isEmpty()) } - if (isNullOrEmpty(args.version) || isNullOrEmpty(args.distributionBuildNumber) || isNullOrEmpty(args.distributionBuildUrl) || - isNullOrEmpty(args.rcNumber) || isNullOrEmpty(args.rc) || isNullOrEmpty(args.platform) || - isNullOrEmpty(args.architecture) || isNullOrEmpty(args.distribution) || isNullOrEmpty(args.testReportManifestYml) || isNullOrEmpty(args.jobName)) { + // Check if any args is equals to null or it is a test run + if (isNullOrEmpty(args.distributionBuildUrl) || isNullOrEmpty(args.testReportManifestYml) || isNullOrEmpty(args.jobName) || args.jobName.equals('dummy_job')) { return null } @@ -40,7 +39,6 @@ void call(Map args = [:]) { def formattedDate = new SimpleDateFormat("MM-yyyy").format(currentDate) def testReportManifestYml = args.testReportManifestYml def jobName = args.jobName - def testReportManifestYmlUrl = "https://ci.opensearch.org/ci/dbc/${jobName}/${version}/${distributionBuildNumber}/${platform}/${architecture}/${distribution}/test-results/${integTestBuildNumber}/integ-test/test-report.yml" def manifestFile = readFile testReportManifestYml def manifest = readYaml text: manifestFile def indexName = "opensearch-integration-test-results-${formattedDate}" @@ -52,6 +50,7 @@ void call(Map args = [:]) { def platform = manifest.platform def architecture = manifest.architecture def distribution = manifest.distribution + def testReportManifestYmlUrl = "https://ci.opensearch.org/ci/dbc/${jobName}/${version}/${distributionBuildNumber}/${platform}/${architecture}/${distribution}/test-results/${integTestBuildNumber}/integ-test/test-report.yml" manifest.components.each { component -> def componentName = component.name