[skip ci] Fix docker login (#10835)

Signed-off-by: Edward Zeng <jie.zeng@zilliz.com>
pull/10839/head
edward.zeng 2021-10-28 18:44:23 +08:00 committed by GitHub
parent e5f159ddd6
commit adbc2fd9da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ pipeline {
IMAGE_REPO = "dockerhub-mirror-sh.zilliz.cc/milvusdb"
DOCKER_CREDENTIALS_ID = "f0aacc8e-33f2-458a-ba9e-2c44f431b4d2"
TARGET_REPO = "milvusdb"
HARBAR_CREDENTIAL_ID = "harbor-zilliz-cc-registry"
HARBOR_CREDENTIAL_ID = "harbor-zilliz-cc-registry"
HARBOR_REPO = "harbor.zilliz.cc"
}
@ -52,8 +52,8 @@ pipeline {
"""
}
}
withCredentials([usernamePassword(credentialsId: "${env.HARBAR_CREDENTIAL_ID}", usernameVariable: 'HARBOR_USERNAME', passwordVariable: 'HARBOR_PASSWORD')]) {
sh 'docker login ${env.HARBOR_REPO} -u ${HARBOR_USERNAME} -p ${HARBOR_PASSWORD}'
withCredentials([usernamePassword(credentialsId: "${env.HARBOR_CREDENTIAL_ID}", usernameVariable: 'HARBOR_USERNAME', passwordVariable: 'HARBOR_PASSWORD')]) {
sh 'docker login harbor.zilliz.cc -u ${HARBOR_USERNAME} -p ${HARBOR_PASSWORD}'
sh """
docker push \${MILVUS_HARBOR_IMAGE_REPO}:\${MILVUS_IMAGE_TAG}
docker logout