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
16
16
@Field final String NODE_PATTERN_BASE = ' Worker&&Containers'
17
17
@Field List<BuildEnvironment > environments
18
18
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
-
27
19
this . helper = new JobHelper (this )
28
20
29
21
helper. runWithNotification {
@@ -63,6 +55,9 @@ stage('Configure') {
63
55
buildDiscarder(
64
56
logRotator(daysToKeepStr : ' 90' )
65
57
),
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 ),
66
61
helper. generateNotificationProperty()
67
62
])
68
63
}
You can’t perform that action at this time.
0 commit comments