From 4c44c03fdeb14f7cbfcfa3ed3b124e32349d712e Mon Sep 17 00:00:00 2001 From: quicksilver Date: Fri, 16 Oct 2020 15:52:37 +0800 Subject: [PATCH] [skip ci] Don't get cache when CI is manually triggered (#4010) * Set a timeout for a whole job on Github action pipeline Signed-off-by: quicksilver * [skip ci] Don't get cache when CI is manually triggered Signed-off-by: quicksilver --- .jenkins/modules/Build/MilvusBuild.groovy | 4 ++-- .jenkins/modules/DevTest/SingleNodeDevTest.groovy | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.jenkins/modules/Build/MilvusBuild.groovy b/.jenkins/modules/Build/MilvusBuild.groovy index 62e10b675c..cc68e12b77 100644 --- a/.jenkins/modules/Build/MilvusBuild.groovy +++ b/.jenkins/modules/Build/MilvusBuild.groovy @@ -1,7 +1,7 @@ timeout(time: 60, unit: 'MINUTES') { dir ("ci/scripts") { def isTimeTriggeredBuild = currentBuild.getBuildCauses('hudson.triggers.TimerTrigger$TimerTriggerCause').size() != 0 - if (!isTimeTriggeredBuild) { + if (!isTimeTriggeredBuild && "${params.IS_MANUAL_TRIGGER_TYPE}" != "True") { sh ". ./before-install.sh && ./check_cache.sh -l ${params.JFROG_ARTFACTORY_URL}/ccache --cache_dir=\${CCACHE_DIR} -f \${CCACHE_COMPRESS_PACKAGE_FILE} || echo \"ccache files not found!\"" sh ". ./before-install.sh && ./check_cache.sh -l ${params.JFROG_ARTFACTORY_URL}/thirdparty --cache_dir=\${CUSTOM_THIRDPARTY_DOWNLOAD_PATH} -f \${THIRDPARTY_COMPRESS_PACKAGE_FILE} || echo \"thirdparty files not found!\"" } @@ -14,7 +14,7 @@ timeout(time: 60, unit: 'MINUTES') { withCredentials([usernamePassword(credentialsId: "${params.JFROG_CREDENTIALS_ID}", usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD')]) { sh ". ./before-install.sh && ./update_cache.sh -l ${params.JFROG_ARTFACTORY_URL}/ccache --cache_dir=\${CCACHE_DIR} -f \${CCACHE_COMPRESS_PACKAGE_FILE} -u ${USERNAME} -p ${PASSWORD}" - if (isTimeTriggeredBuild) { + if (isTimeTriggeredBuild || "${params.IS_MANUAL_TRIGGER_TYPE}" == "True") { sh ". ./before-install.sh && ./update_cache.sh -l ${params.JFROG_ARTFACTORY_URL}/thirdparty --cache_dir=\${CUSTOM_THIRDPARTY_DOWNLOAD_PATH} -f \${THIRDPARTY_COMPRESS_PACKAGE_FILE} -u ${USERNAME} -p ${PASSWORD}" } } diff --git a/.jenkins/modules/DevTest/SingleNodeDevTest.groovy b/.jenkins/modules/DevTest/SingleNodeDevTest.groovy index 9b7821771b..b254f0e2f9 100644 --- a/.jenkins/modules/DevTest/SingleNodeDevTest.groovy +++ b/.jenkins/modules/DevTest/SingleNodeDevTest.groovy @@ -30,14 +30,14 @@ timeout(time: 150, 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' - if (isTimeTriggeredBuild) { + if (isTimeTriggeredBuild || "${params.IS_MANUAL_TRIGGER_TYPE}" == "True") { sh "pytest . --alluredir=\"test_out/dev/single/mysql\" --level=2 --ip ${env.HELM_RELEASE_NAME}.milvus.svc.cluster.local --service ${env.HELM_RELEASE_NAME} >> ${WORKSPACE}/${env.DEV_TEST_ARTIFACTS}/milvus_${BINARY_VERSION}_mysql_dev_test.log" } else { 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_${BINARY_VERSION}_mysql_dev_test.log" } } - if (isTimeTriggeredBuild) { + if (isTimeTriggeredBuild || "${params.IS_MANUAL_TRIGGER_TYPE}" == "True") { // sqlite database backend test MPLModule('Cleanup Single Node DevTest')