mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 04:49:08 +08:00
a6a9021974
* enable cron test on 0.10.0 Signed-off-by: zw <zw@milvus.io> * fix merge result Signed-off-by: shengjun.li <shengjun.li@zilliz.com> * import test_during_creating_index_restart Signed-off-by: zw <zw@milvus.io> * add http test stage Signed-off-by: zw <zw@milvus.io> * remove Signed-off-by: zw <zw@milvus.io> Co-authored-by: zw <zw@milvus.io> Co-authored-by: shengjun.li <shengjun.li@zilliz.com>
59 lines
3.6 KiB
Groovy
59 lines
3.6 KiB
Groovy
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'
|
|
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}"]]])
|
|
sh 'helm dep update'
|
|
|
|
retry(3) {
|
|
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) {
|
|
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
|
|
if (!helmResult) {
|
|
sh "helm uninstall -n milvus ${env.HELM_RELEASE_NAME} && sleep 1m"
|
|
}
|
|
throw exc
|
|
}
|
|
}
|
|
}
|
|
|
|
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'
|
|
sh "pytest . --level=2 --alluredir=\"test_out/dev/single/mysql\" --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local"
|
|
}
|
|
// sqlite database backend test
|
|
load "ci/jenkins/step/cleanupSingleDev.groovy"
|
|
|
|
if (!fileExists('milvus-helm')) {
|
|
dir ("milvus-helm") {
|
|
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}"]]])
|
|
}
|
|
}
|
|
dir ("milvus-helm") {
|
|
retry(3) {
|
|
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) {
|
|
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
|
|
if (!helmResult) {
|
|
sh "helm uninstall -n milvus ${env.HELM_RELEASE_NAME} && sleep 1m"
|
|
}
|
|
throw exc
|
|
}
|
|
}
|
|
}
|
|
dir ("tests/milvus_python_test") {
|
|
sh "pytest . --level=2 --alluredir=\"test_out/dev/single/sqlite\" --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local"
|
|
sh "pytest . --level=1 --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local --port=19121 --handler=HTTP"
|
|
}
|
|
}
|