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>
This commit is contained in:
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

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'],