- I would like to disable a Multibranch item so that no underlying job can be triggered
- I would like to disable a Organization item so that no underlying job can be triggered
- CloudBees CI (CloudBees Core) on modern cloud platforms - Managed Master
- CloudBees CI (CloudBees Core) on traditional platforms - Client Master
- CloudBees Jenkins Enterprise - Managed Master
- CloudBees Jenkins Platform - Client Master
- CloudBees Jenkins Distribution
- Folders Plugin 6.1.0 to 6.11
- Branch API Plugin 2.0.11 or later
Since the release of Folders plugin 6.1.0 and Branch API 2.0.11, there is an API to disable Computer Folders such as Multibranch and Organization items. The API uses a QueueDecisionHandler that prevents scheduling builds from any job that is descendant of a disabled computed folder. This applies to any type of trigger, whether it originates from a branch indexing event, an SCM event or even a manual trigger.
Folders Plugin 6.12, you’ll be able to enable and disable them by clicking on the
Disable Multibranch Pipeline or the corresponding item button.
If it’s not possible for you doing an immediate upgrade of the folder plugins, you can temporarily workaround it following one of the options below:
/enableto the URL of the Multibranch / Organization and then hit “Retry Using POST”.
- Run the following code on the Script console:
Jenkins.get().getItemByFullName("PATH/TO/YOURMULTIBRANCH").doEnable() //To enable the item Jenkins.get().getItemByFullName("PATH/TO/YOURMULTIBRANCH").doDisable() //To disable the item
With both of the options above, the disabled item will displayed a greyed out icon.