update ci/jenkins/jenkinsfile/publishImages.groovy

Former-commit-id: 4e2f7226865549b60a72d348d2e10bc1dcd4b5f4
pull/191/head
test 2019-10-16 22:56:35 +08:00
parent 6bce1f7a57
commit 509a9a49d7
1 changed files with 4 additions and 0 deletions

View File

@ -13,6 +13,10 @@ container('publish-images') {
def imageName = "${PROJECT_NAME}/engine:${DOCKER_VERSION}"
try {
def isExistImage = sh(returnStatus: true, script: "docker inspect --type=image ${imageName}")
if (isExistImage == 0) {
sh "docker rmi ${imageName}"
}
def customImage = docker.build("${imageName}")
docker.withRegistry('https://registry.zilliz.com', "${params.DOCKER_CREDENTIALS_ID}") {
customImage.push()