mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-30 07:25:37 +08:00
add isTimeTriggeredBuild function in ci/jenkins/Jenkinsfile
Former-commit-id: d19c73db3fb8a3bc942402b547114b9b554ef585
This commit is contained in:
parent
0a7434020f
commit
66cfb2d527
10
ci/jenkins/Jenkinsfile
vendored
10
ci/jenkins/Jenkinsfile
vendored
@ -25,7 +25,6 @@ pipeline {
|
||||
SEMVER = "${BRANCH_NAME}"
|
||||
JOBNAMES = env.JOB_NAME.split('/')
|
||||
PIPELINE_NAME = "${JOBNAMES[0]}"
|
||||
NIGHTLIY_TEST = "${cron_string == "" ? false : true}"
|
||||
}
|
||||
|
||||
stages {
|
||||
@ -125,7 +124,8 @@ pipeline {
|
||||
steps {
|
||||
container('milvus-test-env') {
|
||||
script {
|
||||
if (NIGHTLIY_TEST) {
|
||||
boolean isNightlyTest = isTimeTriggeredBuild()
|
||||
if (isNightlyTest) {
|
||||
load "${env.WORKSPACE}/ci/jenkins/jenkinsfile/singleDevNightlyTest.groovy"
|
||||
} else {
|
||||
load "${env.WORKSPACE}/ci/jenkins/jenkinsfile/singleDevTest.groovy"
|
||||
@ -160,3 +160,9 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
boolean isTimeTriggeredBuild() {
|
||||
for (Object currentBuildCause : script.currentBuild.rawBuild.getCauses()) {
|
||||
return currentBuildCause.class.getName().contains('TimerTriggerCause')
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user