Files
vllm-image/Jenkinsfile

54 lines
1.9 KiB
Plaintext
Raw Permalink Normal View History

2026-06-01 19:28:08 -04:00
pipeline {
agent any
environment {
REGISTRY = 'atl.vultrcr.com/vllm'
}
parameters {
2026-06-01 21:30:35 -04:00
string(name: 'BASE_IMAGE', defaultValue: '', description: 'Base image to build from')
string(name: 'NAME', defaultValue: 'vllm', description: 'Docker image name')
string(name: 'TAG', defaultValue: 'latest', description: 'Docker image tag')
string(name: 'PLATFORMS', defaultValue: 'linux/amd64,linux/arm64', description: 'Target platforms to build image for')
2026-06-01 19:28:08 -04:00
string(name: 'GIT_REPO', defaultValue: '', description: 'Git repository URL (optional, uses workspace if empty)')
string(name: 'GIT_BRANCH', defaultValue: 'master', description: 'Git branch to build')
}
stages {
stage('Checkout') {
steps {
script {
if (params.GIT_REPO) {
git url: params.GIT_REPO, branch: params.GIT_BRANCH
}
}
}
}
stage('Build & Push') {
2026-06-01 19:28:08 -04:00
steps {
script {
2026-06-01 21:30:35 -04:00
def buildArg = params.BASE_IMAGE ? "--build-arg BASE_IMAGE=${params.BASE_IMAGE}" : ''
2026-06-01 19:28:08 -04:00
docker.withRegistry("https://${REGISTRY}", 'ATL_VCR_VLLM') {
sh """
docker buildx create --use --name vllm-builder || docker buildx use vllm-builder
docker buildx build \
2026-06-01 21:30:35 -04:00
--platform ${params.PLATFORMS} \
${buildArg} \
-t ${REGISTRY}/${params.NAME}:${params.TAG} \
--push \
.
2026-06-01 19:28:08 -04:00
"""
}
}
}
}
}
post {
always {
sh "docker buildx rm vllm-builder || true"
2026-06-01 19:28:08 -04:00
}
}
}