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 5fe75cf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
10 changes: 8 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,21 @@
* @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 = [:]) {

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 5fe75cf

Please sign in to comment.