ci: 构建镜像命令修改

This commit is contained in:
CaptainB 2022-06-29 20:43:26 +08:00 committed by 刘瑞斌
parent 9e675d6e10
commit 35e98299f9
1 changed files with 1 additions and 1 deletions

2
Jenkinsfile vendored
View File

@ -27,7 +27,7 @@ pipeline {
stage('Docker build & push') {
steps {
sh '''
su - metersphere -c "cd ${WORKSPACE} && docker buildx build --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-\${GIT_COMMIT:0:8} -t ${IMAGE_PREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME} --platform linux/amd64,linux/arm64 . --push"
su - metersphere -c "cd ${WORKSPACE} && docker buildx create --use && docker buildx build --build-arg MS_VERSION=\${TAG_NAME:-\$BRANCH_NAME}-\${GIT_COMMIT:0:8} -t ${IMAGE_PREFIX}/${IMAGE_NAME}:\${TAG_NAME:-\$BRANCH_NAME} --platform linux/amd64,linux/arm64 . --push"
'''
}
}