File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -16,14 +16,6 @@ import org.hibernate.jenkins.pipeline.helpers.job.JobHelper
1616@Field final String NODE_PATTERN_BASE = ' Worker&&Containers'
1717@Field List<BuildEnvironment > environments
1818
19- // Cancel previous runs automatically by reaching milestones
20- // See https://issues.jenkins.io/browse/JENKINS-43353
21- def buildNumber = BUILD_NUMBER as int ;
22- if (buildNumber > 1 ) {
23- milestone(buildNumber - 1 )
24- }
25- milestone(buildNumber)
26-
2719this . helper = new JobHelper (this )
2820
2921helper. runWithNotification {
@@ -63,6 +55,9 @@ stage('Configure') {
6355 buildDiscarder(
6456 logRotator(daysToKeepStr : ' 90' )
6557 ),
58+ // If two builds are about the same branch or pull request,
59+ // the older one will be aborted when the newer one starts.
60+ disableConcurrentBuilds(abortPrevious : true ),
6661 helper. generateNotificationProperty()
6762 ])
6863}
You can’t perform that action at this time.
0 commit comments