ci: 使用metersphere用户执行docker命令
This commit is contained in:
parent
1138a34a81
commit
6b65cec61c
|
@ -26,7 +26,10 @@ pipeline {
|
|||
}
|
||||
stage('Docker build & push') {
|
||||
steps {
|
||||
sh "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"
|
||||
sh '''
|
||||
su - metersphere
|
||||
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
|
||||
'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue