2020-04-21 18:46:21 +08:00
|
|
|
timeout(time: 180, unit: 'MINUTES') {
|
|
|
|
dir ('milvus-helm') {
|
|
|
|
sh 'helm version'
|
|
|
|
sh 'helm repo add stable https://kubernetes.oss-cn-hangzhou.aliyuncs.com/charts'
|
|
|
|
sh 'helm repo update'
|
2020-04-25 18:40:49 +08:00
|
|
|
checkout([$class: 'GitSCM', branches: [[name: "${env.HELM_BRANCH}"]], userRemoteConfigs: [[url: "https://github.com/milvus-io/milvus-helm.git", name: 'origin', refspec: "+refs/heads/${env.HELM_BRANCH}:refs/remotes/origin/${env.HELM_BRANCH}"]]])
|
2020-06-02 10:17:51 +08:00
|
|
|
sh 'helm dep update'
|
|
|
|
|
2020-04-21 18:46:21 +08:00
|
|
|
retry(3) {
|
2020-04-26 20:08:07 +08:00
|
|
|
try {
|
|
|
|
sh "helm install --wait --timeout 300s --set image.repository=registry.zilliz.com/milvus/engine --set image.tag=${DOCKER_VERSION} --set image.pullPolicy=Always --set service.type=ClusterIP -f ci/db_backend/mysql_${BINARY_VERSION}_values.yaml -f ci/filebeat/values.yaml --namespace milvus ${env.HELM_RELEASE_NAME} ."
|
|
|
|
} catch (exc) {
|
2020-05-08 10:00:09 +08:00
|
|
|
def helmStatusCMD = "helm get manifest --namespace milvus ${env.HELM_RELEASE_NAME} | kubectl describe -n milvus -f - && \
|
|
|
|
kubectl logs --namespace milvus -l \"app=milvus,release=${env.HELM_RELEASE_NAME}\" -c milvus && \
|
|
|
|
helm status -n milvus ${env.HELM_RELEASE_NAME}"
|
|
|
|
def helmResult = sh script: helmStatusCMD, returnStatus: true
|
2020-04-26 20:08:07 +08:00
|
|
|
if (!helmResult) {
|
2020-05-09 19:54:44 +08:00
|
|
|
sh "helm uninstall -n milvus ${env.HELM_RELEASE_NAME} && sleep 1m"
|
2020-04-26 20:08:07 +08:00
|
|
|
}
|
|
|
|
throw exc
|
|
|
|
}
|
2020-04-21 18:46:21 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dir ("tests/milvus_python_test") {
|
|
|
|
// sh 'python3 -m pip install -r requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com'
|
|
|
|
sh 'python3 -m pip install -r requirements.txt'
|
2020-05-26 14:13:23 +08:00
|
|
|
sh "pytest . --level=2 --alluredir=\"test_out/dev/single/mysql\" --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local"
|
2020-04-21 18:46:21 +08:00
|
|
|
}
|
|
|
|
// sqlite database backend test
|
|
|
|
load "ci/jenkins/step/cleanupSingleDev.groovy"
|
|
|
|
|
|
|
|
if (!fileExists('milvus-helm')) {
|
|
|
|
dir ("milvus-helm") {
|
2020-04-25 18:40:49 +08:00
|
|
|
checkout([$class: 'GitSCM', branches: [[name:"${env.HELM_BRANCH}"]], userRemoteConfigs: [[url: "https://github.com/milvus-io/milvus-helm.git", name: 'origin', refspec: "+refs/heads/${env.HELM_BRANCH}:refs/remotes/origin/${env.HELM_BRANCH}"]]])
|
2020-04-21 18:46:21 +08:00
|
|
|
}
|
2020-04-16 09:37:29 +08:00
|
|
|
}
|
2019-11-15 16:16:44 +08:00
|
|
|
dir ("milvus-helm") {
|
2020-04-21 18:46:21 +08:00
|
|
|
retry(3) {
|
2020-04-26 20:08:07 +08:00
|
|
|
try {
|
|
|
|
sh "helm install --wait --timeout 300s --set image.repository=registry.zilliz.com/milvus/engine --set image.tag=${DOCKER_VERSION} --set image.pullPolicy=Always --set service.type=ClusterIP -f ci/db_backend/sqlite_${BINARY_VERSION}_values.yaml -f ci/filebeat/values.yaml --namespace milvus ${env.HELM_RELEASE_NAME} ."
|
|
|
|
} catch (exc) {
|
2020-05-08 10:00:09 +08:00
|
|
|
def helmStatusCMD = "helm get manifest --namespace milvus ${env.HELM_RELEASE_NAME} | kubectl describe -n milvus -f - && \
|
|
|
|
kubectl logs --namespace milvus -l \"app=milvus,release=${env.HELM_RELEASE_NAME}\" -c milvus && \
|
|
|
|
helm status -n milvus ${env.HELM_RELEASE_NAME}"
|
|
|
|
def helmResult = sh script: helmStatusCMD, returnStatus: true
|
2020-04-26 20:08:07 +08:00
|
|
|
if (!helmResult) {
|
2020-05-09 19:54:44 +08:00
|
|
|
sh "helm uninstall -n milvus ${env.HELM_RELEASE_NAME} && sleep 1m"
|
2020-04-26 20:08:07 +08:00
|
|
|
}
|
|
|
|
throw exc
|
|
|
|
}
|
2020-04-21 18:46:21 +08:00
|
|
|
}
|
2019-11-15 16:16:44 +08:00
|
|
|
}
|
2020-04-21 18:46:21 +08:00
|
|
|
dir ("tests/milvus_python_test") {
|
2020-05-26 14:13:23 +08:00
|
|
|
sh "pytest . --level=2 --alluredir=\"test_out/dev/single/sqlite\" --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local"
|
2020-06-08 19:36:55 +08:00
|
|
|
sh "pytest . --level=1 --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local --port=19121 --handler=HTTP"
|
2020-04-16 09:37:29 +08:00
|
|
|
}
|
2020-03-17 10:36:24 +08:00
|
|
|
}
|