mirror of https://github.com/milvus-io/milvus.git
[skip ci] Push milvus image to harbor (#10811)
Signed-off-by: Edward Zeng <jie.zeng@zilliz.com>pull/10816/head
parent
d264e150cf
commit
ac7e770921
|
@ -23,6 +23,8 @@ 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_REPO = "harbor.zilliz.cc/milvus"
|
||||
}
|
||||
|
||||
stages {
|
||||
|
@ -39,15 +41,24 @@ pipeline {
|
|||
sh 'docker login -u ${DOCKER_USERNAME} -p ${DOCKER_PASSWORD}'
|
||||
sh """
|
||||
export MILVUS_IMAGE_REPO="${env.TARGET_REPO}/milvus-dev"
|
||||
export MILVUS_HARBOR_IMAGE_REPO="${env.HARBOR_REPO}/milvus"
|
||||
export MILVUS_IMAGE_TAG="${env.BRANCH_NAME}-${date}-${gitShortCommit}"
|
||||
build/build_image.sh
|
||||
docker push \${MILVUS_IMAGE_REPO}:\${MILVUS_IMAGE_TAG}
|
||||
docker tag \${MILVUS_IMAGE_REPO}:\${MILVUS_IMAGE_TAG} \${MILVUS_IMAGE_REPO}:${env.BRANCH_NAME}-latest
|
||||
docker tag \${MILVUS_IMAGE_REPO}:\${MILVUS_IMAGE_TAG} \${MILVUS_HARBOR_IMAGE_REPO}:\${MILVUS_IMAGE_TAG}
|
||||
docker push \${MILVUS_IMAGE_REPO}:${env.BRANCH_NAME}-latest
|
||||
docker logout
|
||||
"""
|
||||
}
|
||||
}
|
||||
withCredentials([usernamePassword(credentialsId: "${env.HARBAR_CREDENTIAL_ID}", usernameVariable: 'HARBOR_USERNAME', passwordVariable: 'HARBOR_PASSWORD')]) {
|
||||
sh 'docker login -u ${HARBOR_USERNAME} -p ${HARBOR_PASSWORD}'
|
||||
sh """
|
||||
docker push \${MILVUS_HARBOR_IMAGE_REPO}:\${MILVUS_IMAGE_TAG}
|
||||
docker logout
|
||||
"""
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue