Skip to content

Commit

Permalink
OpenSearch Project Build Publish
Browse files Browse the repository at this point in the history
Signed-off-by: Prudhvi Godithi <[email protected]>
  • Loading branch information
prudhvigodithi committed Jul 22, 2024
2 parents 955cafa + 96cf7bf commit 7d7e838
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
1 change: 0 additions & 1 deletion vars/publishDistributionBuildResults.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* @param args.rcNumber <required> - The RC number against which the integration test is executed.
* @param args.failureMessages <required> - Failure message retrieved from buildFailureMessage() method.
* @param args.passMessages <required> - Passing message retrieved from buildFailureMessage() method. Used to get the passed components list.
* @param args.distribution <required> - The distribution of the integration test build. Used to get the failed components list.
* @param args.componentCategory <required> - The OpenSearch or OpenSearch Dashboards plugin
* @param args.inputManifestPath <required> - Path to input manifest.
*/
Expand Down
11 changes: 9 additions & 2 deletions vars/publishIntegTestResults.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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 <required> - The version against which the integration test is executed.
* @param args.distributionBuildNumber <required> - The jenkins distribution build number.
Expand All @@ -20,14 +19,22 @@
* @param args.architecture <required> - The architecture of the integration test build.
* @param args.distribution <required> - The distribution of the integration test build.
* @param args.testReportManifestYml <required> - The generated test report YAML file using test report workflow.
*/

import groovy.json.JsonOutput
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
Expand Down
7 changes: 6 additions & 1 deletion vars/uploadMinSnapshotsToS3.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down

0 comments on commit 7d7e838

Please sign in to comment.