From 824dec03f61cc7a4e6e8f2ffe92857f0ce1d34ab Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 13 May 2020 07:34:52 +0100 Subject: [PATCH] Cherry-pick #18317 to 7.x: [CI] cancel old builds (#18452) --- Jenkinsfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index aaa1a860594..7e34da3ddfe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,7 +29,8 @@ pipeline { ansiColor('xterm') disableResume() durabilityHint('PERFORMANCE_OPTIMIZED') - disableConcurrentBuilds() + quietPeriod(10) + rateLimitBuilds(throttle: [count: 60, durationName: 'hour', userBoost: true]) } triggers { issueCommentTrigger('(?i).*(?:jenkins\\W+)?run\\W+(?:the\\W+)?tests(?:\\W+please)?.*') @@ -53,6 +54,7 @@ pipeline { stage('Checkout') { options { skipDefaultCheckout() } steps { + pipelineManager([ cancelPreviousRunningBuilds: [ when: 'PR' ] ]) deleteDir() gitCheckout(basedir: "${BASE_DIR}", githubNotifyFirstTimeContributor: true) stash allowEmpty: true, name: 'source', useDefaultExcludes: false