未验证 提交 dc286bcd 编写于 作者: Q quicksilver 提交者: GitHub

Archive dev test logs in Jenkins CI (#2579)

* Archive dev test logs in Jenkins CI
Signed-off-by: Nquicksilver <zhifeng.zhang@zilliz.com>

* Archive dev test logs in Jenkins CI
Signed-off-by: Nquicksilver <zhifeng.zhang@zilliz.com>

* Update Jenkinsfile

* Archive dev test logs in Jenkins CI
Signed-off-by: Nquicksilver <zhifeng.zhang@zilliz.com>

* Update Jenkinsfile
Signed-off-by: Nquicksilver <zhifeng.zhang@zilliz.com>
上级 45b8872d
......@@ -157,6 +157,7 @@ pipeline {
FORMAT_OS_NAME = "${OS_NAME}".replaceAll("\\.", "-").replaceAll("_", "-")
HELM_RELEASE_NAME = "${env.PIPELINE_NAME}-${env.FROMAT_SEMVER}-${env.BUILD_NUMBER}-single-${FORMAT_OS_NAME}-${BINARY_VERSION}".toLowerCase()
SHARDS_HELM_RELEASE_NAME = "${env.PIPELINE_NAME}-${env.FROMAT_SEMVER}-${env.BUILD_NUMBER}-shards-${FORMAT_OS_NAME}-${BINARY_VERSION}".toLowerCase()
DEV_TEST_ARTIFACTS = "_artifacts/${FROMAT_SEMVER}/${FORMAT_OS_NAME}"
}
agent {
......@@ -172,6 +173,8 @@ pipeline {
steps {
container('milvus-test-env') {
script {
sh "mkdir -p ${env.DEV_TEST_ARTIFACTS}"
boolean isNightlyTest = isTimeTriggeredBuild()
if (isNightlyTest || "${params.IS_MANUAL_TRIGGER_TYPE}" == "True") {
load "${env.WORKSPACE}/ci/jenkins/step/singleDevNightlyTest.groovy"
......@@ -189,6 +192,7 @@ pipeline {
cleanup {
container('milvus-test-env') {
script {
archiveArtifacts artifacts: "${env.DEV_TEST_ARTIFACTS}/**", allowEmptyArchive: true
load "${env.WORKSPACE}/ci/jenkins/step/cleanupSingleDev.groovy"
boolean isNightlyTest = isTimeTriggeredBuild()
if (isNightlyTest || "${params.IS_MANUAL_TRIGGER_TYPE}" == "True") {
......
......@@ -24,6 +24,6 @@ timeout(time: 180, unit: 'MINUTES') {
dir ("tests/milvus_python_test") {
sh 'python3 -m pip install -r requirements.txt'
sh "pytest . --level=2 --alluredir=\"test_out/dev/shards/\" --ip ${env.SHARDS_HELM_RELEASE_NAME}.milvus.svc.cluster.local"
sh "pytest . --level=2 --alluredir=\"test_out/dev/shards/\" --ip ${env.SHARDS_HELM_RELEASE_NAME}.milvus.svc.cluster.local >> ${WORKSPACE}/${env.DEV_TEST_ARTIFACTS}/milvus_shards_dev_test.log"
}
}
......@@ -23,7 +23,7 @@ timeout(time: 180, unit: 'MINUTES') {
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"
sh "pytest . --level=2 --alluredir=\"test_out/dev/single/mysql\" --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local >> ${WORKSPACE}/${env.DEV_TEST_ARTIFACTS}/milvus_mysql_dev_test.log"
}
// sqlite database backend test
load "ci/jenkins/step/cleanupSingleDev.groovy"
......@@ -48,7 +48,7 @@ timeout(time: 180, unit: 'MINUTES') {
}
}
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=2 --alluredir=\"test_out/dev/single/sqlite\" --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local >> ${WORKSPACE}/${env.DEV_TEST_ARTIFACTS}/milvus_sqlite_dev_test.log"
sh "pytest . --level=1 --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local --port=19121 --handler=HTTP"
}
}
......@@ -22,7 +22,7 @@ timeout(time: 120, unit: 'MINUTES') {
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 . --alluredir=\"test_out/dev/single/mysql\" --level=1 --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local --service ${env.HELM_RELEASE_NAME}"
sh "pytest . --alluredir=\"test_out/dev/single/mysql\" --level=1 --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local --service ${env.HELM_RELEASE_NAME} >> ${WORKSPACE}/${env.DEV_TEST_ARTIFACTS}/milvus_mysql_dev_test.log"
// sh "pytest test_restart.py --alluredir=\"test_out/dev/single/mysql\" --level=3 --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local --service ${env.HELM_RELEASE_NAME}"
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册