From 846f801d290ff257487c11d1995f7e2e3741c6a7 Mon Sep 17 00:00:00 2001 From: quicksilver Date: Fri, 12 Mar 2021 09:58:04 +0800 Subject: [PATCH] Add regression docker compose file Signed-off-by: quicksilver --- .../modules/Regression/PythonRegression.groovy | 2 +- build/ci/jenkins/Jenkinsfile | 1 - tests/python_test/docker-compose.yml | 15 +++++++++++++++ tests/python_test/docker-entrypoint.sh | 9 --------- tests/python_test/requirements.txt | 1 + 5 files changed, 17 insertions(+), 11 deletions(-) create mode 100644 tests/python_test/docker-compose.yml delete mode 100755 tests/python_test/docker-entrypoint.sh diff --git a/.jenkins/modules/Regression/PythonRegression.groovy b/.jenkins/modules/Regression/PythonRegression.groovy index e9eb1e22ee..9e78da8426 100644 --- a/.jenkins/modules/Regression/PythonRegression.groovy +++ b/.jenkins/modules/Regression/PythonRegression.groovy @@ -48,7 +48,7 @@ timeout(time: 60, unit: 'MINUTES') { container('test-env') { try { dir ('tests/python_test') { - sh "python3 -m pip install --no-cache-dir pymilvus-distributed==${env.PYMILVUS_VERSION}" + sh "python3 -m pip install --no-cache-dir -r requirements.txt" sh "pytest --tags=0331 --ip ${env.HELM_RELEASE_NAME}-milvus-ha.${env.HELM_RELEASE_NAMESPACE}.svc.cluster.local" } } catch (exc) { diff --git a/build/ci/jenkins/Jenkinsfile b/build/ci/jenkins/Jenkinsfile index 43971d3c7a..2566c2ddc1 100644 --- a/build/ci/jenkins/Jenkinsfile +++ b/build/ci/jenkins/Jenkinsfile @@ -84,7 +84,6 @@ pipeline { } environment { HELM_BRANCH = "main" - PYMILVUS_VERSION = "0.0.42" HELM_RELEASE_NAMESPACE = "dev" HELM_RELEASE_NAME = "${PROJECT_NAME}-${SEMVER}-${env.BUILD_NUMBER}-${REGRESSION_SERVICE_TYPE}".replaceAll("\\.", "-").replaceAll("_", "-").toLowerCase() DEV_TEST_ARTIFACTS_PATH = "artifacts" diff --git a/tests/python_test/docker-compose.yml b/tests/python_test/docker-compose.yml new file mode 100644 index 0000000000..c243b62518 --- /dev/null +++ b/tests/python_test/docker-compose.yml @@ -0,0 +1,15 @@ +version: '3.5' + +services: + regression: + image: milvusdb/pytest:latest + build: + dockerfile: Dockerfile + volumes: + - ../..:/milvus-distributed:delegated + working_dir: "/milvus-distributed/tests/python_test" + networks: + - milvus + +networks: + milvus: \ No newline at end of file diff --git a/tests/python_test/docker-entrypoint.sh b/tests/python_test/docker-entrypoint.sh deleted file mode 100755 index af9ba0ba66..0000000000 --- a/tests/python_test/docker-entrypoint.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -set -e - -if [ "$1" = 'start' ]; then - tail -f /dev/null -fi - -exec "$@" \ No newline at end of file diff --git a/tests/python_test/requirements.txt b/tests/python_test/requirements.txt index 8eee517ab7..cf0175eb70 100644 --- a/tests/python_test/requirements.txt +++ b/tests/python_test/requirements.txt @@ -10,5 +10,6 @@ allure-pytest==2.7.0 pytest-print==0.2.1 pytest-level==0.1.1 pytest-xdist==2.2.1 +pymilvus-distributed==0.0.42 pytest-rerunfailures==9.1.1 git+https://gitee.com/quicksilver/pytest-tags.git