enhance: [cpp-unit-test] abort previous build if it's a PR, otherwise… (#37571)

[cpp-unit-test] abort previous build if it's a PR, otherwise queue the
build

Signed-off-by: Yellow Shine <sammy.huang@zilliz.com>
pull/37625/head
yellow-shine 2024-11-12 19:14:29 +08:00 committed by GitHub
parent 2630717836
commit cef5b7fd60
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -9,7 +9,8 @@ pipeline {
parallelsAlwaysFailFast()
buildDiscarder logRotator(artifactDaysToKeepStr: '30')
preserveStashes(buildCount: 5)
disableConcurrentBuilds(abortPrevious: true)
// abort previous build if it's a PR, otherwise queue the build
disableConcurrentBuilds(abortPrevious: env.CHANGE_ID != null)
timeout(time: 6, unit: 'HOURS')
throttleJobProperty(
categories: ['cpp-unit-test'],