From c1db307f83fa04d480a9434dced86d94768b960a Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Tue, 12 May 2020 15:17:57 +0100 Subject: [PATCH] [CI] cancel old builds (#18317) --- 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