ci: 使用普通用户build

This commit is contained in:
CaptainB 2022-04-22 21:47:14 +08:00 committed by 刘瑞斌
parent bbf5117d87
commit 695169c053
1 changed files with 1 additions and 2 deletions

3
Jenkinsfile vendored
View File

@ -27,8 +27,7 @@ pipeline {
stage('Docker build & push') { stage('Docker build & push') {
steps { steps {
sh ''' sh '''
su - metersphere 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"
sudo 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
''' '''
} }
} }