Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable a Jenkins Multibranch Pipeline project

I've been creating a few Multibranch Pipeline projects in Jenkins and now

I've "upgraded" to use a GitHub Organization project.

How do I disable the old Multibranch Pipeline projects? I don't see any Disable button anywhere.

Here is a screenshot of what I mean: enter image description here

Since I can't add a screenshot to a reply, I'm editing my question to include the screenshot to show I have the latest version of the Pipeline Plugin installed, 2.16:

enter image description here

like image 201
grayaii Avatar asked Dec 15 '17 21:12

grayaii


People also ask

How do I disable the Multibranch pipeline in Jenkins?

The UI controls to disable and enable Multibranch / Organization items have been fixed in Folders Plugin 6.12 as per JENKINS-60900. Since 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.

How do I enable the Multibranch pipeline in Jenkins?

Head over to your Jenkins instance and create a new item. Enter a name for the job, and select the “Multibranch Pipeline” option at the end of the screen. Then, click on the OK button. In the next screen, go to the “Branch sources” tab, click on the “Add source” button, and choose “Git” from the dropdown menu.

What is the difference between pipeline and Multibranch pipeline in Jenkins?

Jenkins Pipeline Vs. Multibranch Pipeline. A multibranch pipeline is meant for building multiple branches from a repository and deploy to multiple environments if required. A pipeline job supports both pipeline steps to be added in Jenkins configuration and form SCM.

What is Multibranch pipeline project?

The Multibranch Pipeline project type enables you to implement different Jenkinsfiles for different branches of the same project. In a Multibranch Pipeline project, Jenkins automatically discovers, manages and executes Pipelines for branches which contain a Jenkinsfile in source control.


2 Answers

If you are using a recent version of the Pipeline Job plugin (I am using version 2.25 from Sep 5, 2018) and you do not see the disable option, then you can still disable the job by appending /disable to the URL of the job.

Source:

You would need to be logged in as a user who has access to write/configure builds. And if the build is Pipeline Multibranch you still won't see the disable button. If that's the case, you can append /disable to the project URL to disable it.

https://issues.jenkins-ci.org/browse/JENKINS-27299?focusedCommentId=336904&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-336904

like image 60
Amedee Van Gasse Avatar answered Sep 21 '22 06:09

Amedee Van Gasse


Append /disable to the end of Job URL. Then Jenkins will redirect you to a page where you can Post. Same applies for /enable too

enter image description here

like image 22
so-random-dude Avatar answered Sep 19 '22 06:09

so-random-dude