Skip to content

Commit

Permalink
Switch docker re-release to use 6.2.0 lib in jenkinsfile (#4393)
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Zhu <[email protected]>
  • Loading branch information
peterzhuamazon authored Feb 1, 2024
1 parent 9db2234 commit 59578c8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 2 additions & 1 deletion jenkins/docker/docker-re-release.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* compatible open source license.
*/

lib = library(identifier: 'jenkins@5.11.1', retriever: modernSCM([
lib = library(identifier: 'jenkins@6.2.0', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
Expand Down Expand Up @@ -61,6 +61,7 @@ pipeline {
post {
always {
postCleanup()
sh("docker image prune -f --all")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/jenkins/TestDockerReRelease.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TestDockerReRelease extends BuildPipelineTest {

helper.registerSharedLibrary(
library().name('jenkins')
.defaultVersion('5.11.1')
.defaultVersion('6.2.0')
.allowOverride(true)
.implicit(true)
.targetPath('vars')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
docker-re-release.run()
docker-re-release.modernSCM({$class=GitSCMSource, remote=https://github.com/opensearch-project/opensearch-build-libraries.git})
docker-re-release.library({identifier=jenkins@5.11.1, retriever=null})
docker-re-release.library({identifier=jenkins@6.2.0, retriever=null})
docker-re-release.pipeline(groovy.lang.Closure)
docker-re-release.timeout({time=2, unit=HOURS})
docker-re-release.echo(Executing on agent [label:none])
Expand All @@ -14,7 +14,7 @@
docker-re-release.script(groovy.lang.Closure)
docker-re-release.patchDockerImage({product=opensearch, tag=1})
patchDockerImage.legacySCM(groovy.lang.Closure)
patchDockerImage.library({identifier=jenkins@5.11.1, retriever=null})
patchDockerImage.library({identifier=jenkins@6.2.0, retriever=null})
patchDockerImage.sh(#!/bin/bash
set -e
set +x
Expand All @@ -27,14 +27,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@5.11.1, retriever=null})
buildDockerImage.library({identifier=jenkins@6.2.0, 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)
Expand All @@ -53,3 +53,4 @@
patchDockerImage.build({job=docker-promotion, propagate=true, wait=true, parameters=[null, null, null]})
docker-re-release.postCleanup()
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true})
docker-re-release.sh(docker image prune -f --all)

0 comments on commit 59578c8

Please sign in to comment.