Build multi-arch (amd64 + arm64) images with buildx

This commit is contained in:
2026-06-01 19:53:54 -04:00
parent c0d488ebf7
commit 24490fe955

22
Jenkinsfile vendored
View File

@@ -5,6 +5,7 @@ pipeline {
REGISTRY = 'atl.vultrcr.com/vllm'
IMAGE_NAME = 'vllm'
IMAGE = "${REGISTRY}/${IMAGE_NAME}:latest"
PLATFORMS = 'linux/amd64,linux/arm64'
}
parameters {
@@ -24,32 +25,27 @@ pipeline {
}
}
stage('Build') {
stage('Build & Push') {
steps {
script {
docker.withRegistry("https://${REGISTRY}", 'ATL_VCR_VLLM') {
sh """
docker build -t ${REGISTRY}/${IMAGE_NAME}:${params.IMAGE_TAG} .
docker buildx create --use --name vllm-builder || docker buildx use vllm-builder
docker buildx build \
--platform ${PLATFORMS} \
-t ${REGISTRY}/${IMAGE_NAME}:${params.IMAGE_TAG} \
--push \
.
"""
}
}
}
}
stage('Push') {
steps {
script {
docker.withRegistry("https://${REGISTRY}", 'ATL_VCR_VLLM') {
docker.image("${REGISTRY}/${IMAGE_NAME}:${params.IMAGE_TAG}").push()
}
}
}
}
}
post {
always {
sh "docker rmi ${IMAGE} || true"
sh "docker buildx rm vllm-builder || true"
}
}
}