diff --git a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile index 08e61d393d..f4b6e5c4cf 100644 --- a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile +++ b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile @@ -5,7 +5,9 @@ pipeline { steps { script { buildDockerImage( - inputManifest: 'tests/jenkins/data/opensearch-1.3.0.yml' + inputManifest: 'tests/jenkins/data/opensearch-1.3.0.yml', + artifactUrlX64: env.ARTIFACT_URL_linux_x64, + artifactUrlArm64: env.ARTIFACT_URL_linux_arm64 ) } } diff --git a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_builds_both.txt b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_builds_both.txt index c3d32c285c..9da8786aa5 100644 --- a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_builds_both.txt +++ b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_builds_both.txt @@ -3,10 +3,14 @@ BuildDockerImage_Jenkinsfile.echo(Executing on agent [label:none]) BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure) BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml}) + BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=opensearch.linux.x64, artifactUrlArm64=opensearch.linux.arm64}) buildDockerImage.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) buildDockerImage.legacySCM(groovy.lang.Closure) buildDockerImage.library({identifier=jenkins@20211123, retriever=null}) buildDockerImage.readYaml({file=tests/jenkins/data/opensearch-1.3.0.yml}) InputManifest.asBoolean() - buildDockerImage.echo(Skipping docker build, one of x64 or arm64 artifacts was not built.) + 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_SCRIPT_WITH_COMMANDS, value=id && pwd && cd docker/release && curl -sSL opensearch.linux.x64 -o opensearch-x64.tgz && curl -sSL opensearch.linux.arm64 -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 33}) + buildDockerImage.booleanParam({name=IS_STAGING, value=true}) + buildDockerImage.build({job=docker-build, parameters=[null, null, null, null]}) diff --git a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_arm64.txt b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_arm64.txt index c3d32c285c..ab84ae06b8 100644 --- a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_arm64.txt +++ b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_arm64.txt @@ -3,7 +3,7 @@ BuildDockerImage_Jenkinsfile.echo(Executing on agent [label:none]) BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure) BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml}) + BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=opensearch.linux.x64, artifactUrlArm64=null}) buildDockerImage.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) buildDockerImage.legacySCM(groovy.lang.Closure) buildDockerImage.library({identifier=jenkins@20211123, retriever=null}) diff --git a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_both.txt b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_both.txt index c3d32c285c..dce6048d79 100644 --- a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_both.txt +++ b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_both.txt @@ -3,7 +3,7 @@ BuildDockerImage_Jenkinsfile.echo(Executing on agent [label:none]) BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure) BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml}) + BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=null, artifactUrlArm64=null}) buildDockerImage.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) buildDockerImage.legacySCM(groovy.lang.Closure) buildDockerImage.library({identifier=jenkins@20211123, retriever=null}) diff --git a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_x64.txt b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_x64.txt index c3d32c285c..f42ba6f0f7 100644 --- a/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_x64.txt +++ b/tests/jenkins/jobs/BuildDockerImage_Jenkinsfile_skips_x64.txt @@ -3,7 +3,7 @@ BuildDockerImage_Jenkinsfile.echo(Executing on agent [label:none]) BuildDockerImage_Jenkinsfile.stage(build docker image, groovy.lang.Closure) BuildDockerImage_Jenkinsfile.script(groovy.lang.Closure) - BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml}) + BuildDockerImage_Jenkinsfile.buildDockerImage({inputManifest=tests/jenkins/data/opensearch-1.3.0.yml, artifactUrlX64=null, artifactUrlArm64=opensearch.linux.arm64}) buildDockerImage.git({url=https://github.com/opensearch-project/opensearch-build.git, branch=main}) buildDockerImage.legacySCM(groovy.lang.Closure) buildDockerImage.library({identifier=jenkins@20211123, retriever=null}) diff --git a/tests/jenkins/jobs/Build_OpenSearch_Dashboards_Jenkinsfile b/tests/jenkins/jobs/Build_OpenSearch_Dashboards_Jenkinsfile index 3aab7b5613..e5dfa042d6 100644 --- a/tests/jenkins/jobs/Build_OpenSearch_Dashboards_Jenkinsfile +++ b/tests/jenkins/jobs/Build_OpenSearch_Dashboards_Jenkinsfile @@ -43,11 +43,15 @@ pipeline { } steps { script { - buildAssembleUpload( + def buildManifestObj = archiveAssembleUpload( inputManifest: "manifests/${INPUT_MANIFEST}", platform: 'linux', architecture: 'x64' ) + + String artifactUrl = buildManifestObj.getArtifactUrl('bundle-build', '1') + env.ARTIFACT_URL_X64 = artifactUrl + echo "artifactUrl (x64): ${artifactUrl}" } } post { @@ -94,11 +98,15 @@ pipeline { } steps { script { - archiveAssembleUpload( + def buildManifestObj = archiveAssembleUpload( inputManifest: "manifests/${INPUT_MANIFEST}", platform: 'linux', architecture: 'arm64' ) + + String artifactUrl = buildManifestObj.getArtifactUrl('bundle-build', '1') + env.ARTIFACT_URL_ARM64 = artifactUrl + echo "artifactUrl (arm64): ${artifactUrl}" } } post { @@ -116,7 +124,9 @@ pipeline { node('Jenkins-Agent-al2-x64-c54xlarge-Docker-Host') { script { buildDockerImage( - inputManifest: "manifests/${INPUT_MANIFEST}" + inputManifest: "manifests/${INPUT_MANIFEST}", + artifactUrlX64: env.ARTIFACT_URL_X64, + artifactUrlArm64: env.ARTIFACT_URL_ARM64 ) } }