diff --git a/Jenkinsfile b/Jenkinsfile index d32b62a493..d05bf5ad7b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -27,8 +27,7 @@ pipeline { stage('Docker build & push') { steps { sh ''' - su - metersphere - 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 + 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" ''' } }