Add support for abort-builds
This was added to the cloudbees-folder-plugin JENKINS-60677. Change-Id: Iacc1afcee0355d6b60a2f4e76364b4b980da7908
This commit is contained in:
parent
e064158d05
commit
76cc236d8a
@ -58,6 +58,8 @@ Plugins required:
|
|||||||
(default '-1, all')
|
(default '-1, all')
|
||||||
* **days-to-keep** (`int`): For how many days should a build be kept.
|
* **days-to-keep** (`int`): For how many days should a build be kept.
|
||||||
(default '-1, forever')
|
(default '-1, forever')
|
||||||
|
* **abort-builds** (`bool`): Abort all pending or ongoing builds for removed
|
||||||
|
SCM heads (i.e. deleted branches). (default false)
|
||||||
* **script-path** (`str`): Path to Jenkinsfile, relative to workspace.
|
* **script-path** (`str`): Path to Jenkinsfile, relative to workspace.
|
||||||
(default 'Jenkinsfile')
|
(default 'Jenkinsfile')
|
||||||
* **script-id** (`str`): Script id from the global Jenkins script store
|
* **script-id** (`str`): Script id from the global Jenkins script store
|
||||||
@ -220,6 +222,7 @@ class WorkflowMultiBranch(jenkins_jobs.modules.base.Base):
|
|||||||
("prune-dead-branches", "pruneDeadBranches", True, [True, False]),
|
("prune-dead-branches", "pruneDeadBranches", True, [True, False]),
|
||||||
("days-to-keep", "daysToKeep", -1),
|
("days-to-keep", "daysToKeep", -1),
|
||||||
("number-to-keep", "numToKeep", -1),
|
("number-to-keep", "numToKeep", -1),
|
||||||
|
("abort-builds", "abortBuilds", False, [True, False]),
|
||||||
]
|
]
|
||||||
helpers.convert_mapping_to_xml(ois, data, ois_mapping)
|
helpers.convert_mapping_to_xml(ois, data, ois_mapping)
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>10</daysToKeep>
|
<daysToKeep>10</daysToKeep>
|
||||||
<numToKeep>10</numToKeep>
|
<numToKeep>10</numToKeep>
|
||||||
|
<abortBuilds>true</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers>
|
<triggers>
|
||||||
<com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger plugin="cloudbees-folder">
|
<com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger plugin="cloudbees-folder">
|
||||||
|
@ -7,6 +7,7 @@ periodic-folder-trigger: 1d
|
|||||||
prune-dead-branches: True
|
prune-dead-branches: True
|
||||||
number-to-keep: '10'
|
number-to-keep: '10'
|
||||||
days-to-keep: '10'
|
days-to-keep: '10'
|
||||||
|
abort-builds: True
|
||||||
script-path: 'some.Jenkinsfile'
|
script-path: 'some.Jenkinsfile'
|
||||||
scm:
|
scm:
|
||||||
- bitbucket:
|
- bitbucket:
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
<pruneDeadBranches>true</pruneDeadBranches>
|
<pruneDeadBranches>true</pruneDeadBranches>
|
||||||
<daysToKeep>-1</daysToKeep>
|
<daysToKeep>-1</daysToKeep>
|
||||||
<numToKeep>-1</numToKeep>
|
<numToKeep>-1</numToKeep>
|
||||||
|
<abortBuilds>false</abortBuilds>
|
||||||
</orphanedItemStrategy>
|
</orphanedItemStrategy>
|
||||||
<triggers/>
|
<triggers/>
|
||||||
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api">
|
||||||
|
Loading…
Reference in New Issue
Block a user