How to disable a Jenkins Multibranch Pipeline project - jenkins

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:
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:

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

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

Go into the configuration page for the multi branch pipeline. Under the Branch Sources, in the Properties section, add a property, and select "Suppress automatic SCM triggering".

The Multibranch plugin I installed is 2.21. No "Disable" option is available (at least I didn't see it). I did the following to disable the multibranch pipeline:
Open the pipeline -> Configure -> uncheck Periodically if not otherwise run under Scan Multibranch Pipeline Triggers

You are not seeing the disable option may be because you are using an older version of pipeline job plugin. The feature to disable job was added in version 2.11 released in May 2017. Refer change log of pipeline job plugin and try updating your plugin to latest.
For multi branch pipeline specific branches can be disabled in Project > Configure > Branch Sources > Exception

Related

Branch disabled in multibranch pipeline and reopened with Scan event

We have one project configured as multibranch pipeline project with branch filtered master and development. After few hours the master branch is disabled with a strikethrough symbol across its name and build option not available .
When clicked on "Scan Multibranch Pipeline", it enabled the branch and pipeline logs show "Branch ReOpened".
Initially we assumed it would be because of Option "Exclude branches included in pull request" but enabling "All branches" too is disabling the master branch time and time again.
Pipeline Logs are not providing any clear indication of whats happening causing it to disable .Please help .
Old topic but I faced the same error today but the solution was different.
The error was in the configuration of branch discovery
Discover branches > Strategy. I was using Exclude branches that are also filed as PRs
And there was a PR targeting this branch. Change for All branches did the trick.
This looks like a bug to me. First I'll go to http://[jenkins]/log/all to see if there are any interesting logs there, then I would open an issue on https://issues.jenkins.io/secure/Dashboard.jspa
Also this issue might be happening after a recent upgrade of jenkins plugins or jenkins itself, I would downgrade everything to try to get my jenkins back to the way it was, then upgrade the plugins one by one or few by few to try to isolate what is causing the issue.
Finally, if you have jobdsl scripts, I would check these scripts to see if there is not a script that when executed is recreating the job and overrides the disabled status
Not sure if you're using Bitbucket Branch Source plugin for hook on Jenkins, but I had the same issue on 737.vdf9dc06105be version. Everytime I pushed a change to branch (not pull request) it got disabled (strikethrough). Scan multibranch pipeline was restoring it until next push notification on webhook was performed.
Upgrading the plugin to 751.vda_24678a_f781 version resolved the issues:)

Configure JIRA Trigger Plugin for Jenkins multi branch pipeline

I have Jenkins Mutibranch pipeline. I want to integrate my Jira with one of multibranch project. I have installed the JIRA Trigger Plugin and configured Webhook in Jira. however, when I checked in my Jenkins job it does not show me the B***uild when an issue is updated in JIRA*** but it shows when I go to View Configuration in the particular branch. it allows me to select the Build when an issue is updated in JIRA but there is no option to save the changes. I know this might be a reason the option is view only. but how can I configure this?
Is anyone configured JIRA Trigger Plugin with Jenkins mutibranch project where using Jenkinsfile? and what is the correct way of integrating this?
Should I do some coding in the Jenkins file to get this done?

Jenkins missing Build Trigger section after upgrade

I've upgraded Jenkins version (now on 2.127) and plugins and now the UI of job configuration is different and I am missing the build triggers section, especially the Trigger Builds Remotely via authentication token. Where is it? Do I need to enable it explicitly? The changelog unfortunately does not mention anything about that and I even can't schedule builds periodically.
Finally found out: It seems that since the update, the Multibranch Pipeline does no longer have this section. So either choose Pipeline or set it in the Jenkinsfile via: https://github.com/jenkins-infra/jenkins.io/blob/c0828af5b8bd428815e23537c808cd0267017013/Jenkinsfile#L6
The webhook works without a token with the Generic Webhook Plugin.

Jenkins Pipeline - global pipeline library updates show up in job's list of recent changes, how to prevent this?

I don't want my global pipeline changes to show up in Jenkins list of changes.
Whenever a build is ran and there are global pipeline updates, the list of changes for that build include all updates made to the global pipeline. I only want the list of changes that the build picked up from the SCM branch that is being built, not any of the global pipeline updates. Is this possible?
Such option to disable the changelog exists since version 2.9 of the Pipeline Shared Groovy Libraries Plugin:
#Library(value="mylib", changelog=false)
You can also uncheck the corresponding box in the Jenkins system settings if you are administrator for your Jenkins, see here:
In addition to #StephenKing's response, if you use the library step, do it this way
library identifier: 'mylib', changelog: false
More info on the topic in this improvement request
I have encountered the same problem and did an ugly workaround .
just at any change of the pipeline library put a prefix in your source control commit and then when you parse your changes you can ignore the changes with the commit prefix comment
I hope it helps

Do Jenkins multibranch Pipelines allow remote triggers?

I am trying to to allow my multibranch Jenkins Pipeline to be triggered from a script. However each time I check the box and enter my token name and hit save, it does not save the configuration. When I next hit edit configuration the checkmark next to "Trigger builds remotely" is no longer checked.
Is this intentional? Do MultiBranch Pipeline jobs not support remote triggers?
Actually, for now, it is possible to trigger the build of a multibranch pipeline, but the token is simply ignored.
If you go in a branch of your multibranch pipeline and go to "View Configuration", you can try to check "Trigger builds remotely (e.g., from scripts)" and see that it gives you a link like JENKINS_URL/job/<your-multibranch-pipeline>/job/<your-branch>/build.
That sounds a bit like a hack, and you might have authentication problems depending on your setup, but otherwise it does trigger the build with Jenkins 2.30.
I have the same problem. Haven't found a solution yet, but there is a bug report open against it.

Resources