From 02c1262f27cc0292ded0305e7c6765f49c23ea75 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 29 Apr 2022 18:02:52 +0000 Subject: [PATCH] Make sure the build repo is pulled in docker-build stage Signed-off-by: Peter Zhu --- .../distribution-build.jenkinsfile | 28 +++++++++++------- .../opensearch/distribution-build.jenkinsfile | 29 +++++++++++-------- 2 files changed, 34 insertions(+), 23 deletions(-) diff --git a/jenkins/opensearch-dashboards/distribution-build.jenkinsfile b/jenkins/opensearch-dashboards/distribution-build.jenkinsfile index 10a25784f9..7752e2a489 100644 --- a/jenkins/opensearch-dashboards/distribution-build.jenkinsfile +++ b/jenkins/opensearch-dashboards/distribution-build.jenkinsfile @@ -433,18 +433,24 @@ pipeline { return params.BUILD_DOCKER } } + agent { + docker { + label AGENT_X64 + image dockerAgent.image + args dockerAgent.args + alwaysPull true + } + } steps { - node(AGENT_X64) { - script { - echo "env.ARTIFACT_URL_X64_TAR: ${env.ARTIFACT_URL_X64_TAR}" - echo "env.ARTIFACT_URL_ARM64_TAR: ${env.ARTIFACT_URL_ARM64_TAR}" - - buildDockerImage( - inputManifest: "manifests/${INPUT_MANIFEST}", - artifactUrlX64: env.ARTIFACT_URL_X64_TAR, - artifactUrlArm64: env.ARTIFACT_URL_ARM64_TAR - ) - } + script { + echo "env.ARTIFACT_URL_X64_TAR: ${env.ARTIFACT_URL_X64_TAR}" + echo "env.ARTIFACT_URL_ARM64_TAR: ${env.ARTIFACT_URL_ARM64_TAR}" + + buildDockerImage( + inputManifest: "manifests/${INPUT_MANIFEST}", + artifactUrlX64: env.ARTIFACT_URL_X64_TAR, + artifactUrlArm64: env.ARTIFACT_URL_ARM64_TAR + ) } } } diff --git a/jenkins/opensearch/distribution-build.jenkinsfile b/jenkins/opensearch/distribution-build.jenkinsfile index 57c58b8716..701b614a7f 100644 --- a/jenkins/opensearch/distribution-build.jenkinsfile +++ b/jenkins/opensearch/distribution-build.jenkinsfile @@ -432,19 +432,24 @@ pipeline { return params.BUILD_DOCKER } } + agent { + docker { + label AGENT_X64 + image dockerAgent.image + args dockerAgent.args + alwaysPull true + } + } steps { - node('Jenkins-Agent-al2-x64-c54xlarge-Docker-Host') { - script { - - echo "env.ARTIFACT_URL_X64_TAR: ${env.ARTIFACT_URL_X64_TAR}" - echo "env.ARTIFACT_URL_ARM64_TAR: ${env.ARTIFACT_URL_ARM64_TAR}" - - buildDockerImage( - inputManifest: "manifests/${INPUT_MANIFEST}", - artifactUrlX64: env.ARTIFACT_URL_X64_TAR, - artifactUrlArm64: env.ARTIFACT_URL_ARM64_TAR - ) - } + script { + echo "env.ARTIFACT_URL_X64_TAR: ${env.ARTIFACT_URL_X64_TAR}" + echo "env.ARTIFACT_URL_ARM64_TAR: ${env.ARTIFACT_URL_ARM64_TAR}" + + buildDockerImage( + inputManifest: "manifests/${INPUT_MANIFEST}", + artifactUrlX64: env.ARTIFACT_URL_X64_TAR, + artifactUrlArm64: env.ARTIFACT_URL_ARM64_TAR + ) } } }