mirror of https://github.com/milvus-io/milvus.git
Schedule cron job in Jenkins CI
Signed-off-by: quicksilver <zhifeng.zhang@zilliz.com>pull/4973/head^2
parent
f4d055cf42
commit
321d020b0f
|
@ -1,4 +1,5 @@
|
|||
timeout(time: 150, unit: 'MINUTES') {
|
||||
def isTimeTriggeredBuild = currentBuild.getBuildCauses('hudson.triggers.TimerTrigger$TimerTriggerCause').size() != 0
|
||||
container('deploy-env') {
|
||||
dir ('milvus-helm-chart') {
|
||||
sh " helm version && \
|
||||
|
@ -49,7 +50,12 @@ timeout(time: 150, unit: 'MINUTES') {
|
|||
try {
|
||||
dir ('tests/python_test') {
|
||||
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"
|
||||
if (isTimeTriggeredBuild) {
|
||||
echo "This is Cron Job!"
|
||||
sh "pytest --tags=0331 --ip ${env.HELM_RELEASE_NAME}-milvus-ha.${env.HELM_RELEASE_NAMESPACE}.svc.cluster.local"
|
||||
} else {
|
||||
sh "pytest --tags=0331 --ip ${env.HELM_RELEASE_NAME}-milvus-ha.${env.HELM_RELEASE_NAMESPACE}.svc.cluster.local"
|
||||
}
|
||||
}
|
||||
} catch (exc) {
|
||||
echo 'PyTest Regression Failed !'
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
@Library('mpl') _
|
||||
|
||||
String cron_timezone = "TZ=Asia/Shanghai"
|
||||
String cron_string = BRANCH_NAME == "r0.3-test" ? "50 22 * * * " : ""
|
||||
String cron_string = BRANCH_NAME == "r0.3-test" ? "50 22,4,10,16 * * * " : ""
|
||||
|
||||
pipeline {
|
||||
agent none
|
||||
|
|
Loading…
Reference in New Issue