diff --git a/vars/publishDistributionBuildResults.groovy b/vars/publishDistributionBuildResults.groovy index 9871fc58..ed601bbc 100644 --- a/vars/publishDistributionBuildResults.groovy +++ b/vars/publishDistributionBuildResults.groovy @@ -14,7 +14,6 @@ * @param args.rcNumber - The RC number against which the integration test is executed. * @param args.failureMessages - Failure message retrieved from buildFailureMessage() method. * @param args.passMessages - Passing message retrieved from buildFailureMessage() method. Used to get the passed components list. - * @param args.distribution - The distribution of the integration test build. Used to get the failed components list. * @param args.componentCategory - The OpenSearch or OpenSearch Dashboards plugin * @param args.inputManifestPath - Path to input manifest. */ diff --git a/vars/publishIntegTestResults.groovy b/vars/publishIntegTestResults.groovy index b192da9e..8fb35132 100644 --- a/vars/publishIntegTestResults.groovy +++ b/vars/publishIntegTestResults.groovy @@ -9,7 +9,6 @@ /** Library to fetch the failing Integration test details at the end of Integration Test Jenkins build and index the results to OpenSearch Metrics cluster. * - * @param Map args = [:] args A map of the following parameters. * @param args.version - The version against which the integration test is executed. * @param args.distributionBuildNumber - The jenkins distribution build number. @@ -20,7 +19,6 @@ * @param args.architecture - The architecture of the integration test build. * @param args.distribution - The distribution of the integration test build. * @param args.testReportManifestYml - The generated test report YAML file using test report workflow. - */ import groovy.json.JsonOutput @@ -28,6 +26,15 @@ import java.text.SimpleDateFormat import java.util.Date void call(Map args = [:]) { + + // To ensure the test TestOpenSearchIntegTest from opensearch-build repo is passes. + if (!args.version || !args.distributionBuildNumber || !args.distributionBuildUrl || + !args.rcNumber || !args.rc || !args.platform || + !args.architecture || !args.distribution || !args.testReportManifestYml) { + return null + } + + def version = args.version.toString() def integTestBuildNumber = currentBuild.number def integTestBuildUrl = env.RUN_DISPLAY_URL diff --git a/vars/uploadMinSnapshotsToS3.groovy b/vars/uploadMinSnapshotsToS3.groovy index ab3520c0..e185a02b 100644 --- a/vars/uploadMinSnapshotsToS3.groovy +++ b/vars/uploadMinSnapshotsToS3.groovy @@ -52,11 +52,16 @@ void call(Map args = [:]) { echo("Start copying files: version-${version} architecture-${architecture} platform-${platform} buildid-${id} distribution-${distribution} extension-${extension}") + String sedCmd = "sed" + if (platform == "darwin") { + sedCmd = "gsed" + } + sh """ cp -v ${srcDir}/${baseName}.${extension} ${srcDir}/${baseName}-latest.${extension} cp -v ${srcDir}/${baseName}.${extension}.sha512 ${srcDir}/${baseName}-latest.${extension}.sha512 cp -v ${srcDir}/../manifest.yml ${srcDir}/${baseName}-latest.${extension}.build-manifest.yml - sed -i "s/.${extension}/-latest.${extension}/g" ${srcDir}/${baseName}-latest.${extension}.sha512 + ${sedCmd} -i "s/.${extension}/-latest.${extension}/g" ${srcDir}/${baseName}-latest.${extension}.sha512 """ withCredentials([ string(credentialsId: 'jenkins-artifact-promotion-role', variable: 'ARTIFACT_PROMOTION_ROLE_NAME'),