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 + ) } } }