Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable a specific branch in a Jenkins Multibranch job?

I have a multibranch job in my Jenkins, and it has been running on multiple branches over the last few months.
Now I finished working on some of the branches, and I want to prevent them from running again, but I didn't find a way to disable a branch.
Is there any way I can disable a specific branch without disabling the whole job?

like image 766
Amit Itzkovitch Avatar asked Oct 11 '25 13:10

Amit Itzkovitch


1 Answers

Sure, that's possible. On the multibranch pipeline configuration, click Add -> Filter by name.
Then, you can add the branch you want to disable on the Exclude text box, it will appear cross out on the multibranch view page.
If you already use the Filter by name (with wildcard) for example, removing the branch name from the Include text box will disable the specific branch as well.

like image 84
Learner Avatar answered Oct 14 '25 09:10

Learner