diff --git a/build.gradle b/build.gradle index e319350b0..29b3e7253 100644 --- a/build.gradle +++ b/build.gradle @@ -121,7 +121,7 @@ jacocoTestReport { } } -String version = '6.1.1' +String version = '6.2.0' task updateVersion { doLast { diff --git a/tests/jenkins/jobs/PatchDockerImage_Jenkinsfile.txt b/tests/jenkins/jobs/PatchDockerImage_Jenkinsfile.txt index cc70e601f..9ff9e6fcb 100644 --- a/tests/jenkins/jobs/PatchDockerImage_Jenkinsfile.txt +++ b/tests/jenkins/jobs/PatchDockerImage_Jenkinsfile.txt @@ -18,14 +18,14 @@ patchDockerImage.sh({script=docker inspect --format '{{ index .Config.Labels "org.label-schema.version"}}' opensearchproject/opensearch:latest, returnStdout=true}) patchDockerImage.readYaml({file=manifests/1.3.0/opensearch-1.3.0.yml}) InputManifest.asBoolean() - patchDockerImage.buildDockerImage({inputManifest=manifests/1.3.0/opensearch-1.3.0.yml, buildNumber=7756, buildDate=20230619, buildOption=re_release_docker_image, artifactUrlX64=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/7756/linux/x64/tar/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz, artifactUrlArm64=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/7756/linux/arm64/tar/dist/opensearch/opensearch-1.3.0-linux-arm64.tar.gz}) + patchDockerImage.buildDockerImage({inputManifest=manifests/1.3.0/opensearch-1.3.0.yml, buildNumber=7756, buildGitRef=1.3.0, buildDate=20230619, buildOption=re_release_docker_image, artifactUrlX64=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/7756/linux/x64/tar/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz, artifactUrlArm64=https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/7756/linux/arm64/tar/dist/opensearch/opensearch-1.3.0-linux-arm64.tar.gz}) buildDockerImage.legacySCM(groovy.lang.Closure) buildDockerImage.library({identifier=jenkins@main, retriever=null}) buildDockerImage.readYaml({file=manifests/1.3.0/opensearch-1.3.0.yml}) InputManifest.asBoolean() buildDockerImage.echo(Triggering docker-build) buildDockerImage.string({name=DOCKER_BUILD_GIT_REPOSITORY, value=https://github.com/opensearch-project/opensearch-build}) - buildDockerImage.string({name=DOCKER_BUILD_GIT_REPOSITORY_REFERENCE, value=main}) + buildDockerImage.string({name=DOCKER_BUILD_GIT_REPOSITORY_REFERENCE, value=1.3.0}) buildDockerImage.string({name=DOCKER_BUILD_SCRIPT_WITH_COMMANDS, value=id && pwd && cd docker/release && curl -sSL https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/7756/linux/x64/tar/dist/opensearch/opensearch-1.3.0-linux-x64.tar.gz -o opensearch-x64.tgz && curl -sSL https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.3.0/7756/linux/arm64/tar/dist/opensearch/opensearch-1.3.0-linux-arm64.tar.gz -o opensearch-arm64.tgz && bash build-image-multi-arch.sh -v 1.3.0 -f ./dockerfiles/opensearch.al2.dockerfile -p opensearch -a 'x64,arm64' -r opensearchstaging/opensearch -t 'opensearch-x64.tgz,opensearch-arm64.tgz' -n 7756}) buildDockerImage.build({job=docker-build, propagate=true, wait=true, parameters=[null, null, null]}) buildDockerImage.echo(Triggering docker create tag with build number) diff --git a/vars/buildDockerImage.groovy b/vars/buildDockerImage.groovy index ad48e1518..0cacd0d3e 100644 --- a/vars/buildDockerImage.groovy +++ b/vars/buildDockerImage.groovy @@ -11,10 +11,11 @@ Library to build Docker Image with different Build Options @param Map[inputManifest] - Path to Input Manifest. @param Map[buildNumber] - Build number of the corresponding Artifact. -@param Map[buildDate] - Date on which the artifacts were built. @param Map[artifactUrlX64] - Url Path to X64 Tarball. @param Map[artifactUrlARM64] - Url Path to ARM64 Tarball. @param Map[buildOption] - Build Option for building the image with different options. +@param Map[buildGitRef] - Build Git Reference of the opensearch-build repository, default to 'main'. +@param Map[buildDate] - Date on which the artifacts were built. */ void call(Map args = [:]) { def lib = library(identifier: 'jenkins@main', retriever: legacySCM(scm)) @@ -22,6 +23,7 @@ void call(Map args = [:]) { def build_version = inputManifest.build.version def build_qualifier = inputManifest.build.qualifier def build_number = args.buildNumber ?: "${BUILD_NUMBER}" + def build_git_ref = args.buildGitRef ?: "main" String image_tag = "" String image_base_os = "al2023" @@ -52,7 +54,7 @@ void call(Map args = [:]) { wait: true, parameters: [ string(name: 'DOCKER_BUILD_GIT_REPOSITORY', value: 'https://github.com/opensearch-project/opensearch-build'), - string(name: 'DOCKER_BUILD_GIT_REPOSITORY_REFERENCE', value: 'main'), + string(name: 'DOCKER_BUILD_GIT_REPOSITORY_REFERENCE', value: "${build_git_ref}"), string(name: 'DOCKER_BUILD_SCRIPT_WITH_COMMANDS', value: [ 'id', 'pwd', diff --git a/vars/patchDockerImage.groovy b/vars/patchDockerImage.groovy index 3c8283fbf..e708346e6 100644 --- a/vars/patchDockerImage.groovy +++ b/vars/patchDockerImage.groovy @@ -65,6 +65,7 @@ void call(Map args = [:]) { buildDockerImage( inputManifest: "manifests/${version}/${args.product}-${version}.yml", buildNumber: "${build_number}", + buildGitRef: "${version}", buildDate: "${build_date}", buildOption: "${build_option}", artifactUrlX64: "${artifactUrlX64}",