Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-27299

Refactor Disable Build feature out of AbstractProject for Pipeline Compatibility

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Currently the Disable Build function is available as part of AbstractProject. This should be refactored out to a place where WorkflowJob can also inherit the functionality.

        Attachments

          Issue Links

            Activity

            apemberton Andy Pemberton created issue -
            danielbeck Daniel Beck made changes -
            Field Original Value New Value
            Assignee Jesse Glick [ jglick ]
            Component/s workflow-plugin [ 18820 ]
            jglick Jesse Glick made changes -
            Component/s workflow-plugin [ 18820 ]
            Hide
            scoheb Scott Hebert added a comment -

            Jesse Glick Are you planning on working on this in the near future? If not, would I be able to take a stab at this?

            Thanks

            Scott

            Show
            scoheb Scott Hebert added a comment - Jesse Glick Are you planning on working on this in the near future? If not, would I be able to take a stab at this? Thanks Scott
            Hide
            jglick Jesse Glick added a comment -

            I had no immediate plans to work on it.

            I suspect ParameterizedJobMixIn is the right home for this, though I have not analyzed it in detail; would just need to try doing the refactoring and see what kind of trouble ensues.

            Show
            jglick Jesse Glick added a comment - I had no immediate plans to work on it. I suspect ParameterizedJobMixIn is the right home for this, though I have not analyzed it in detail; would just need to try doing the refactoring and see what kind of trouble ensues.
            Hide
            danielbeck Daniel Beck added a comment -

            Michael Wyatt This is the original issue you should track for disabling workflows; the CLI command is just piggybacking on AbstractBuild's methods.

            Show
            danielbeck Daniel Beck added a comment - Michael Wyatt This is the original issue you should track for disabling workflows; the CLI command is just piggybacking on AbstractBuild's methods.
            teilo James Nord made changes -
            Link This issue is blocking JENKINS-31345 [ JENKINS-31345 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-33821 [ JENKINS-33821 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 161504 ] JNJira + In-Review [ 180723 ]
            Hide
            bhupsa bhupendra rathore added a comment -

            It would be nice if we can enable/disable the workflow job.
            I configured it to run in cycle and handle many other jobs with various criteria and keep running. Only I can stop it and re-run it but cant disable it so that when required it got enabled and then started again with any jenkins admin.

            Show
            bhupsa bhupendra rathore added a comment - It would be nice if we can enable/disable the workflow job. I configured it to run in cycle and handle many other jobs with various criteria and keep running. Only I can stop it and re-run it but cant disable it so that when required it got enabled and then started again with any jenkins admin.
            abayer Andrew Bayer made changes -
            Labels workflow pipeline workflow
            abayer Andrew Bayer made changes -
            Labels pipeline workflow pipeline
            Hide
            aje Andrew Erickson added a comment -

            This is a core feature in my mind. I'd love to see it fixed/added. Thanks!

            Show
            aje Andrew Erickson added a comment - This is a core feature in my mind. I'd love to see it fixed/added. Thanks!
            Hide
            csiden Christopher Siden added a comment -

            I took a shot at adding disable support to pipeline jobs in two pull requests:
            https://github.com/jenkinsci/jenkins/pull/2543
            https://github.com/jenkinsci/workflow-job-plugin/pull/22

            I haven't done Jenkins development before though, so I'm not sure this is the right way to go about it.

            Show
            csiden Christopher Siden added a comment - I took a shot at adding disable support to pipeline jobs in two pull requests: https://github.com/jenkinsci/jenkins/pull/2543 https://github.com/jenkinsci/workflow-job-plugin/pull/22 I haven't done Jenkins development before though, so I'm not sure this is the right way to go about it.
            Hide
            afahd fahd arshad added a comment -

            Guys, any luck on this?

            Show
            afahd fahd arshad added a comment - Guys, any luck on this?
            Hide
            maxzilla Max Wahler added a comment -

            +1 for this feature!

            There are so many scenarios that require a job to be disabled that I also think that this is a core feature.

            Show
            maxzilla Max Wahler added a comment - +1 for this feature! There are so many scenarios that require a job to be disabled that I also think that this is a core feature.
            Hide
            mbick Michael Bickett added a comment -

            +1 for this feature request please!

            Show
            mbick Michael Bickett added a comment - +1 for this feature request please!
            Hide
            tjajab Andreas Berheim Brudin added a comment -

            +1. That this does not exist makes the gui inconsistent.

            Show
            tjajab Andreas Berheim Brudin added a comment - +1. That this does not exist makes the gui inconsistent.
            Hide
            mhay Mike Hay added a comment -

            +1

            Show
            mhay Mike Hay added a comment - +1
            Hide
            dyerkess David Yerkess added a comment -

            +1 I am loving pipelines, but keep finding various small things that seem to be missing even when they seem important.

            Show
            dyerkess David Yerkess added a comment - +1 I am loving pipelines, but keep finding various small things that seem to be missing even when they seem important.
            Hide
            owenmehegan Owen Mehegan added a comment -

            Folks, it's not helpful to keep posting +1 comments. This generates a fairly pointless email to everyone who is watching this issue. If you want the feature, just add a vote. Thanks.

            Show
            owenmehegan Owen Mehegan added a comment - Folks, it's not helpful to keep posting +1 comments. This generates a fairly pointless email to everyone who is watching this issue. If you want the feature, just add a vote. Thanks.
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            There is a pull request pending to the Jenkins core.
            If somebody is interested to get it sooner, please feel free to contribute by reviewing and testing the changes (or proposing your own PRs).

            Show
            oleg_nenashev Oleg Nenashev added a comment - There is a pull request pending to the Jenkins core. If somebody is interested to get it sooner, please feel free to contribute by reviewing and testing the changes (or proposing your own PRs).
            oleg_nenashev Oleg Nenashev made changes -
            Summary Refactor Disable Build feature out of AbstractProject for Workflow Compatibility Refactor Disable Build feature out of AbstractProject for Pipeline Compatibility
            Hide
            jglick Jesse Glick added a comment -

            Most of the onus is on me to review it, probably. I have not had time.

            Show
            jglick Jesse Glick added a comment - Most of the onus is on me to review it, probably. I have not had time.
            Hide
            clausfod clausfod added a comment -

            Jesse Glick: Any news ? We need this functionality to be able to disable or enable release jobs from criterias in other jobs.

            Show
            clausfod clausfod added a comment - Jesse Glick : Any news ? We need this functionality to be able to disable or enable release jobs from criterias in other jobs.
            Hide
            cpuid Nathan Sullivan added a comment -

            +1 to getting this finished off

            Show
            cpuid Nathan Sullivan added a comment - +1 to getting this finished off
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-40521 [ JENKINS-40521 ]
            Hide
            llamahunter Richard Lee added a comment -

            Is this being actively worked on? There are a lot of votes for it, and it's really inconvenient that pipeline builds can't straightforwardly be temporarily disabled.

            Show
            llamahunter Richard Lee added a comment - Is this being actively worked on? There are a lot of votes for it, and it's really inconvenient that pipeline builds can't straightforwardly be temporarily disabled.
            fredg Fred G made changes -
            Link This issue is blocking JENKINS-36632 [ JENKINS-36632 ]
            Hide
            shahmishal mishal shah added a comment -

            What is the current status of this issue? This is major issue, can we change the priority?

            Show
            shahmishal mishal shah added a comment - What is the current status of this issue? This is major issue, can we change the priority?
            Hide
            jglick Jesse Glick added a comment -

            Nobody pays attention to the priority field. This is on my to-do list. I have not had time to work on it yet.

            Show
            jglick Jesse Glick added a comment - Nobody pays attention to the priority field. This is on my to-do list. I have not had time to work on it yet.
            childnode Marcel 'childNo͡.de' Trautwein made changes -
            Remote Link This issue links to "workflow-job-plugin PR23 (Web Link)" [ 15665 ]
            childnode Marcel 'childNo͡.de' Trautwein made changes -
            Remote Link This issue links to "jenkins PR 2544 (Web Link)" [ 15666 ]
            childnode Marcel 'childNo͡.de' Trautwein made changes -
            Remote Link This issue links to "jenkins PR 2543 (Web Link)" [ 15667 ]
            Hide
            mmitche Matthew Mitchell added a comment -

            I feel like this should be a higher priority. This makes using pipeline in conjunction with job dsl difficult.

            Show
            mmitche Matthew Mitchell added a comment - I feel like this should be a higher priority. This makes using pipeline in conjunction with job dsl difficult.
            Hide
            atikhono Anna Tikhonova added a comment -

            Having Disable Build/Project feature for pipelines would be somewhat a workaround for Safe Restart, since Safe Restart is broken for many pipeline steps. It's a pain to maintain Jenkins having many loooong pipelines. Keeps us away from droping Build Flow plugin completely in favour of pipeline.

            Show
            atikhono Anna Tikhonova added a comment - Having Disable Build/Project feature for pipelines would be somewhat a workaround for Safe Restart, since Safe Restart is broken for many pipeline steps. It's a pain to maintain Jenkins having many loooong pipelines. Keeps us away from droping Build Flow plugin completely in favour of pipeline.
            Hide
            omervk Omer van Kloeten added a comment -

            Was really surprised disabling pipeline builds was not supported. +1 for resolving this issue.

            Show
            omervk Omer van Kloeten added a comment - Was really surprised disabling pipeline builds was not supported. +1 for resolving this issue.
            Hide
            robilott Rob Ilott added a comment - - edited

            This is becoming critical to our decision of whether to move from Build Flow to Pipeline for the majority of our projects.

             

            The fact that we cannot simply disable a pipeline job hurts.

            Show
            robilott Rob Ilott added a comment - - edited This is becoming critical to our decision of whether to move from Build Flow to Pipeline for the majority of our projects.   The fact that we cannot simply disable a pipeline job hurts.
            Hide
            idanadar Idan Adar added a comment - - edited

            Is this related to being able to disable/enable a multi-branch pipeline/job from the Jenkins UI in any way?

            Assuming in a Jenkinsfile run I decide to disable some jobs, e.g:

            post {
                failure {
                    script {
                         def job = Jenkins.instance.getItem("job-name");
                         job.disable();
                    }
                }
            }
            

            If this actually works, how could I then enable it given there is no button in the UI to enable/disable a multi-branch job.

            Show
            idanadar Idan Adar added a comment - - edited Is this related to being able to disable/enable a multi-branch pipeline/job from the Jenkins UI in any way? Assuming in a Jenkinsfile run I decide to disable some jobs, e.g: post { failure { script { def job = Jenkins.instance.getItem( "job-name" ); job.disable(); } } } If this actually works, how could I then enable it given there is no button in the UI to enable/disable a multi-branch job.
            danielbeck Daniel Beck made changes -
            Comment [ bq. Is this related to being able to disable/enable a multi-branch pipeline/job from the Jenkins UI in any way?

            No. ]
            Hide
            danielbeck Daniel Beck added a comment -

            disable/enable a multi-branch pipeline/job

            Multibranch Pipelines are basically folders with some additional behavior, the actual Pipeline jobs are the individual branches. AFAIUI, this is about the latter.

            Show
            danielbeck Daniel Beck added a comment - disable/enable a multi-branch pipeline/job Multibranch Pipelines are basically folders with some additional behavior, the actual Pipeline jobs are the individual branches. AFAIUI, this is about the latter.
            Hide
            mmitche Matthew Mitchell added a comment -

            Yep.  Btw, the two PRs in question working in tandem work to fix this issue.  With just the workflow PR merged, we get some disabling (UI), disabling through manual DSL disable(), but a good number of plugins will view the job as not disabled, and the automatic DSL disable functionality doesn't work.   Both PRs together seem to do what is intended.

             

            https://github.com/jenkinsci/workflow-job-plugin/pull/23

            https://github.com/jenkinsci/jenkins/pull/2544

             

            Show
            mmitche Matthew Mitchell added a comment - Yep.  Btw, the two PRs in question working in tandem work to fix this issue.  With just the workflow PR merged, we get some disabling (UI), disabling through manual DSL disable(), but a good number of plugins will view the job as not disabled, and the automatic DSL disable functionality doesn't work.   Both PRs together seem to do what is intended.   https://github.com/jenkinsci/workflow-job-plugin/pull/23 https://github.com/jenkinsci/jenkins/pull/2544  
            Hide
            idanadar Idan Adar added a comment -

            Thanks for the explanation. Hopefully this ticket will happen sooner than later...

            Show
            idanadar Idan Adar added a comment - Thanks for the explanation. Hopefully this ticket will happen sooner than later...
            Hide
            jochen_haag Jochen Haag added a comment -

            Here is a workaround which works for me when using Git:

            Enable Ignore on push notifications in section Branch Sources of the pipeline job configuration. This way the job is not triggered upon a new commit. But please note that saving the configuration may trigger a branch scan.

             

            Show
            jochen_haag Jochen Haag added a comment - Here is a workaround which works for me when using Git: Enable Ignore on push notifications in section Branch Sources of the pipeline job configuration. This way the job is not triggered upon a new commit. But please note that saving the configuration may trigger a branch scan.  
            Hide
            dcendents Daniel Beland added a comment -

            I cannot use push notifications, so my own workaround is to create a freestyle "trigger" job which polls SCM and use the Parameterized Trigger plugin to trigger the pipeline job (standard trigger mechanism cannot be used with pipeline, another broken feature). I can then enable/disable the "trigger".

            Show
            dcendents Daniel Beland added a comment - I cannot use push notifications, so my own workaround is to create a freestyle "trigger" job which polls SCM and use the Parameterized Trigger plugin to trigger the pipeline job (standard trigger mechanism cannot be used with pipeline, another broken feature). I can then enable/disable the "trigger".
            Hide
            robilott Rob Ilott added a comment -

            We used to use separate trigger jobs, but for the particular type of workflow we're trying to move towards (where pipelines really help us) a trigger job is actually a bit of an inconvenience.

            Show
            robilott Rob Ilott added a comment - We used to use separate trigger jobs, but for the particular type of workflow we're trying to move towards (where pipelines really help us) a trigger job is actually a bit of an inconvenience.
            jamesdumay James Dumay made changes -
            Link This issue blocks JENKINS-36081 [ JENKINS-36081 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Link This issue relates to JENKINS-34716 [ JENKINS-34716 ]
            jglick Jesse Glick made changes -
            Component/s workflow-job-plugin [ 21716 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-job PR 46 (Web Link)" [ 16325 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 2866 (Web Link)" [ 16326 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow-job PR 47 (Web Link)" [ 16400 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java
            src/main/resources/org/jenkinsci/plugins/workflow/job/WorkflowJob/configure-entries.jelly
            src/main/resources/org/jenkinsci/plugins/workflow/job/WorkflowJob/main.jelly
            src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowJobTest.java
            src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowRunRestartTest.java
            src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowRunTest.java
            http://jenkins-ci.org/commit/workflow-job-plugin/d1874be4417070ed07289faf0dd4ab5032e0b58f
            Log:
            Merge pull request #46 from jglick/WorkflowJob.disabled-JENKINS-27299

            JENKINS-27299 WorkflowJob.disabled

            Compare: https://github.com/jenkinsci/workflow-job-plugin/compare/cc4923e5d8ce...d1874be44170

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java src/main/resources/org/jenkinsci/plugins/workflow/job/WorkflowJob/configure-entries.jelly src/main/resources/org/jenkinsci/plugins/workflow/job/WorkflowJob/main.jelly src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowJobTest.java src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowRunRestartTest.java src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowRunTest.java http://jenkins-ci.org/commit/workflow-job-plugin/d1874be4417070ed07289faf0dd4ab5032e0b58f Log: Merge pull request #46 from jglick/WorkflowJob.disabled- JENKINS-27299 JENKINS-27299 WorkflowJob.disabled Compare: https://github.com/jenkinsci/workflow-job-plugin/compare/cc4923e5d8ce...d1874be44170
            Hide
            jglick Jesse Glick added a comment -

            Main fix not dependent on older cores released as workflow-job 2.11.

            Show
            jglick Jesse Glick added a comment - Main fix not dependent on older cores released as workflow-job 2.11 .
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            cli/pom.xml
            core/move-l10n.groovy
            core/pom.xml
            core/src/main/java/hudson/cli/BuildCommand.java
            core/src/main/java/hudson/cli/declarative/CLIRegisterer.java
            core/src/main/java/hudson/cli/handlers/ParameterizedJobOptionHandler.java
            core/src/main/java/hudson/model/AbstractItem.java
            core/src/main/java/hudson/model/AbstractProject.java
            core/src/main/java/hudson/model/ListView.java
            core/src/main/java/jenkins/model/ParameterizedJobMixIn.java
            core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java
            core/src/main/java/jenkins/triggers/SCMTriggerItem.java
            core/src/main/resources/hudson/model/AbstractProject/main.jelly
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled.jelly
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ar.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_bg.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ca.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_cs.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_da.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_de.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_es.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_et.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_fi.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_fr.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_he.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_hu.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_it.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ja.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ko.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_lt.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_lv.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_nb_NO.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_nl.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_pl.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_pt_BR.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_pt_PT.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ro.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ru.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_sk.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_sl.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_sr.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_sv_SE.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_tr.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_uk.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_zh_CN.properties
            core/src/main/resources/hudson/model/AbstractProject/makeDisabled_zh_TW.properties
            core/src/main/resources/hudson/model/Messages.properties
            core/src/main/resources/hudson/model/Messages_bg.properties
            core/src/main/resources/hudson/model/Messages_da.properties
            core/src/main/resources/hudson/model/Messages_de.properties
            core/src/main/resources/hudson/model/Messages_es.properties
            core/src/main/resources/hudson/model/Messages_it.properties
            core/src/main/resources/hudson/model/Messages_ja.properties
            core/src/main/resources/hudson/model/Messages_lt.properties
            core/src/main/resources/hudson/model/Messages_pt_BR.properties
            core/src/main/resources/hudson/model/Messages_sr.properties
            core/src/main/resources/hudson/model/Messages_zh_TW.properties
            core/src/main/resources/jenkins/model/Messages.properties
            core/src/main/resources/jenkins/model/Messages_bg.properties
            core/src/main/resources/jenkins/model/Messages_da.properties
            core/src/main/resources/jenkins/model/Messages_de.properties
            core/src/main/resources/jenkins/model/Messages_es.properties
            core/src/main/resources/jenkins/model/Messages_it.properties
            core/src/main/resources/jenkins/model/Messages_ja.properties
            core/src/main/resources/jenkins/model/Messages_lt.properties
            core/src/main/resources/jenkins/model/Messages_pt_BR.properties
            core/src/main/resources/jenkins/model/Messages_sr.properties
            core/src/main/resources/jenkins/model/Messages_zh_TW.properties
            core/src/main/resources/lib/hudson/project/config-disableBuild.jelly
            core/src/main/resources/lib/hudson/project/makeDisabled.jelly
            core/src/main/resources/lib/hudson/project/makeDisabled_ar.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_bg.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_ca.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_cs.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_da.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_de.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_es.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_et.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_fi.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_fr.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_he.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_hu.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_it.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_ja.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_ko.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_lt.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_lv.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_nb_NO.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_nl.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_pl.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_pt_BR.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_pt_PT.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_ro.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_ru.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_sk.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_sl.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_sr.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_sv_SE.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_tr.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_uk.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_zh_CN.properties
            core/src/main/resources/lib/hudson/project/makeDisabled_zh_TW.properties
            pom.xml
            test/src/test/groovy/hudson/cli/EnableJobCommandTest.groovy
            test/src/test/java/hudson/cli/EnableJobCommandTest.java
            http://jenkins-ci.org/commit/jenkins/3af0cc68cb1cea3047a21400486c075f1b555cf2
            Log:
            JENKINS-27299 Define disabled in ParameterizedJob rather than AbstractProject (#2866)

            • Offering default methods on ParameterizedJob.
            • Javadoc typo.
            • Cleaner use of default methods in ParameterizedJob.
            • Sketch of pulling disabled functionality into ParameterizedJob.
            • EnableJobCommandTest.groovy → EnableJobCommandTest.java, and replacing deprecated Remoting-based CLI calls with CLICommandInvoker.
            • All CLI commands could be broken by a missing CLI.*.shortDescription key on just one!
            • Forgot to move CLI method short descriptions to new package.
            • Needed a @CLIResolver for ParameterizedJob. Adding an OptionHandler while we are here.
            • Trying to fix up access-modifier versions; started failing in CI today for unknown reasons.
            • Introduced <p:makeDisabled/> by analogy with <p:config-disableBuild/>.
            • Using new type bounds.
            • access-modifier 1.11 released.
            • MatrixProject and MavenModuleSet both expect to have access to makeDisabled.jelly.
            • Trying to generalize some more.
            • Minor simplification.
            • isBuildable
            • Obsolete comment.
            • Updated comments.
            • bridge-method-injector 1.17
            • Unfortunately AbstractProject.schedulePolling cannot delegate to SCMTriggerItem.
            • bridge-method-injector 1.17
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: cli/pom.xml core/move-l10n.groovy core/pom.xml core/src/main/java/hudson/cli/BuildCommand.java core/src/main/java/hudson/cli/declarative/CLIRegisterer.java core/src/main/java/hudson/cli/handlers/ParameterizedJobOptionHandler.java core/src/main/java/hudson/model/AbstractItem.java core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/ListView.java core/src/main/java/jenkins/model/ParameterizedJobMixIn.java core/src/main/java/jenkins/model/lazy/LazyBuildMixIn.java core/src/main/java/jenkins/triggers/SCMTriggerItem.java core/src/main/resources/hudson/model/AbstractProject/main.jelly core/src/main/resources/hudson/model/AbstractProject/makeDisabled.jelly core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ar.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_bg.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ca.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_cs.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_da.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_de.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_es.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_et.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_fi.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_fr.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_he.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_hu.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_it.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ja.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ko.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_lt.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_lv.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_nb_NO.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_nl.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_pl.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_pt_BR.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_pt_PT.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ro.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_ru.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_sk.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_sl.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_sr.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_sv_SE.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_tr.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_uk.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_zh_CN.properties core/src/main/resources/hudson/model/AbstractProject/makeDisabled_zh_TW.properties core/src/main/resources/hudson/model/Messages.properties core/src/main/resources/hudson/model/Messages_bg.properties core/src/main/resources/hudson/model/Messages_da.properties core/src/main/resources/hudson/model/Messages_de.properties core/src/main/resources/hudson/model/Messages_es.properties core/src/main/resources/hudson/model/Messages_it.properties core/src/main/resources/hudson/model/Messages_ja.properties core/src/main/resources/hudson/model/Messages_lt.properties core/src/main/resources/hudson/model/Messages_pt_BR.properties core/src/main/resources/hudson/model/Messages_sr.properties core/src/main/resources/hudson/model/Messages_zh_TW.properties core/src/main/resources/jenkins/model/Messages.properties core/src/main/resources/jenkins/model/Messages_bg.properties core/src/main/resources/jenkins/model/Messages_da.properties core/src/main/resources/jenkins/model/Messages_de.properties core/src/main/resources/jenkins/model/Messages_es.properties core/src/main/resources/jenkins/model/Messages_it.properties core/src/main/resources/jenkins/model/Messages_ja.properties core/src/main/resources/jenkins/model/Messages_lt.properties core/src/main/resources/jenkins/model/Messages_pt_BR.properties core/src/main/resources/jenkins/model/Messages_sr.properties core/src/main/resources/jenkins/model/Messages_zh_TW.properties core/src/main/resources/lib/hudson/project/config-disableBuild.jelly core/src/main/resources/lib/hudson/project/makeDisabled.jelly core/src/main/resources/lib/hudson/project/makeDisabled_ar.properties core/src/main/resources/lib/hudson/project/makeDisabled_bg.properties core/src/main/resources/lib/hudson/project/makeDisabled_ca.properties core/src/main/resources/lib/hudson/project/makeDisabled_cs.properties core/src/main/resources/lib/hudson/project/makeDisabled_da.properties core/src/main/resources/lib/hudson/project/makeDisabled_de.properties core/src/main/resources/lib/hudson/project/makeDisabled_es.properties core/src/main/resources/lib/hudson/project/makeDisabled_et.properties core/src/main/resources/lib/hudson/project/makeDisabled_fi.properties core/src/main/resources/lib/hudson/project/makeDisabled_fr.properties core/src/main/resources/lib/hudson/project/makeDisabled_he.properties core/src/main/resources/lib/hudson/project/makeDisabled_hu.properties core/src/main/resources/lib/hudson/project/makeDisabled_it.properties core/src/main/resources/lib/hudson/project/makeDisabled_ja.properties core/src/main/resources/lib/hudson/project/makeDisabled_ko.properties core/src/main/resources/lib/hudson/project/makeDisabled_lt.properties core/src/main/resources/lib/hudson/project/makeDisabled_lv.properties core/src/main/resources/lib/hudson/project/makeDisabled_nb_NO.properties core/src/main/resources/lib/hudson/project/makeDisabled_nl.properties core/src/main/resources/lib/hudson/project/makeDisabled_pl.properties core/src/main/resources/lib/hudson/project/makeDisabled_pt_BR.properties core/src/main/resources/lib/hudson/project/makeDisabled_pt_PT.properties core/src/main/resources/lib/hudson/project/makeDisabled_ro.properties core/src/main/resources/lib/hudson/project/makeDisabled_ru.properties core/src/main/resources/lib/hudson/project/makeDisabled_sk.properties core/src/main/resources/lib/hudson/project/makeDisabled_sl.properties core/src/main/resources/lib/hudson/project/makeDisabled_sr.properties core/src/main/resources/lib/hudson/project/makeDisabled_sv_SE.properties core/src/main/resources/lib/hudson/project/makeDisabled_tr.properties core/src/main/resources/lib/hudson/project/makeDisabled_uk.properties core/src/main/resources/lib/hudson/project/makeDisabled_zh_CN.properties core/src/main/resources/lib/hudson/project/makeDisabled_zh_TW.properties pom.xml test/src/test/groovy/hudson/cli/EnableJobCommandTest.groovy test/src/test/java/hudson/cli/EnableJobCommandTest.java http://jenkins-ci.org/commit/jenkins/3af0cc68cb1cea3047a21400486c075f1b555cf2 Log: JENKINS-27299 Define disabled in ParameterizedJob rather than AbstractProject (#2866) Offering default methods on ParameterizedJob. Javadoc typo. Cleaner use of default methods in ParameterizedJob. Need to pick up https://github.com/infradna/bridge-method-injector/pull/15 to be able to build. Sketch of pulling disabled functionality into ParameterizedJob. EnableJobCommandTest.groovy → EnableJobCommandTest.java, and replacing deprecated Remoting-based CLI calls with CLICommandInvoker. All CLI commands could be broken by a missing CLI.*.shortDescription key on just one! Forgot to move CLI method short descriptions to new package. Needed a @CLIResolver for ParameterizedJob. Adding an OptionHandler while we are here. Trying to fix up access-modifier versions; started failing in CI today for unknown reasons. Introduced <p:makeDisabled/> by analogy with <p:config-disableBuild/>. Using new type bounds. access-modifier 1.11 released. MatrixProject and MavenModuleSet both expect to have access to makeDisabled.jelly. Trying to generalize some more. Minor simplification. JENKINS-34716 Generalizing doPolling and schedulePolling. isBuildable Obsolete comment. Updated comments. bridge-method-injector 1.17 Unfortunately AbstractProject.schedulePolling cannot delegate to SCMTriggerItem. bridge-method-injector 1.17
            Hide
            mbadran mohamed badran added a comment -

            Jesse Glick

            I've seen in the video of Cloudbees that the disable won't work on multibranch pipeline. Is there a way to disable the jobs generated from multibranch pipeline from polling?

            Show
            mbadran mohamed badran added a comment - Jesse Glick I've seen in the video of Cloudbees that the disable won't work on multibranch pipeline. Is there a way to disable the jobs generated from multibranch pipeline from polling?
            Hide
            danielbeck Daniel Beck added a comment -

            Core change towards 2.61.

            Show
            danielbeck Daniel Beck added a comment - Core change towards 2.61.
            jglick Jesse Glick made changes -
            Status In Review [ 10005 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            jglick Jesse Glick added a comment -

            mohamed badran

            Is there a way to disable the jobs generated from multibranch pipeline from polling?

            There were already separate features designed to suppress commit triggers on branch projects, as discussed in the video. This is more a question for the user list.

            Show
            jglick Jesse Glick added a comment - mohamed badran Is there a way to disable the jobs generated from multibranch pipeline from polling? There were already separate features designed to suppress commit triggers on branch projects, as discussed in the video. This is more a question for the user list.
            Hide
            ssbarnea Sorin Sbarnea added a comment -

            I still hope we will see a user friendly option for disabling builds, on all kinds of jobs. The number of watchers on this ticket is a clear sign that something went wrong in the architecture phase of the pipelines.

            Are not going towards a direction where we keep documentation inside videos? ...not to mention that the mentioned video is not even linked to this issue.

            Show
            ssbarnea Sorin Sbarnea added a comment - I still hope we will see a user friendly option for disabling builds, on all kinds of jobs. The number of watchers on this ticket is a clear sign that something went wrong in the architecture phase of the pipelines. Are not going towards a direction where we keep documentation inside videos? ...not to mention that the mentioned video is not even linked to this issue.
            Hide
            jglick Jesse Glick added a comment -

            There is no plan for any feature permitting branch projects to be disabled per se. Stephen Connolly argued against it and I agree. Anyway that would be a separate (linked) RFE.

            Show
            jglick Jesse Glick added a comment - There is no plan for any feature permitting branch projects to be disabled per se. Stephen Connolly argued against it and I agree. Anyway that would be a separate (linked) RFE.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java
            src/main/resources/org/jenkinsci/plugins/workflow/job/WorkflowJob/main.jelly
            src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowJobTest.java
            http://jenkins-ci.org/commit/workflow-job-plugin/8da02e98393c64ebe0f3500e20462adff50c6e67
            Log:
            Merge pull request #47 from jglick/WorkflowJob.disabled+core-JENKINS-27299

            JENKINS-27299 WorkflowJob.disabled on new core

            Compare: https://github.com/jenkinsci/workflow-job-plugin/compare/5a6f27764fbe...8da02e98393c

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/org/jenkinsci/plugins/workflow/job/WorkflowJob.java src/main/resources/org/jenkinsci/plugins/workflow/job/WorkflowJob/main.jelly src/test/java/org/jenkinsci/plugins/workflow/job/WorkflowJobTest.java http://jenkins-ci.org/commit/workflow-job-plugin/8da02e98393c64ebe0f3500e20462adff50c6e67 Log: Merge pull request #47 from jglick/WorkflowJob.disabled+core- JENKINS-27299 JENKINS-27299 WorkflowJob.disabled on new core Compare: https://github.com/jenkinsci/workflow-job-plugin/compare/5a6f27764fbe...8da02e98393c
            Hide
            idanadar Idan Adar added a comment -

            Jesse Glick, trying to understand where the fix is...

            I've installed the Pipeline: Job plugin where the fix is. Now I'm looking at my multi-branch job, its main screen, the branch screen, the pull requests screen and in none one them do I see an enable/disable button.

            When looking at the branch screen though, there is a "view configuration" button and there, under "Build Triggers" I do see "disable this project" with the following description:

            When this option is checked, no new builds of this project will be executed.
            This can be helpful when you want to temporarily prevent a project from being built. For example, if your project depends on some infrastructure — e.g. a test server, or a source code repository — and you know it will be unavailable for a period of time, you could disable the project to prevent unnecessary build failures (and any corresponding notifications) during this period.
            
            You can also disable (or re-enable) this project by clicking the Disable Project (or Enable Project) button on this project's main page.

             

            So am I supppose to see this somewhere in this job type? if not, what are our options for this case?

            Show
            idanadar Idan Adar added a comment - Jesse Glick , trying to understand where the fix is... I've installed the Pipeline: Job plugin where the fix is. Now I'm looking at my multi-branch job, its main screen, the branch screen, the pull requests screen and in none one them do I see an enable/disable button. When looking at the branch screen though, there is a "view configuration" button and there, under "Build Triggers" I do see "disable this project" with the following description: When this option is checked, no new builds of this project will be executed. This can be helpful when you want to temporarily prevent a project from being built. For example, if your project depends on some infrastructure — e.g. a test server, or a source code repository — and you know it will be unavailable for a period of time, you could disable the project to prevent unnecessary build failures (and any corresponding notifications) during this period. You can also disable (or re-enable) this project by clicking the Disable Project (or Enable Project) button on this project's main page.   So am I supppose to see this somewhere in this job type? if not, what are our options for this case?
            Hide
            jglick Jesse Glick added a comment -

            Idan Adar see my last comment above.

            Show
            jglick Jesse Glick added a comment - Idan Adar see my last comment above.
            Hide
            idanadar Idan Adar added a comment -

            So in this context what does "per se" mean? If there isn't should we ditch the multi branch job type then?

            Show
            idanadar Idan Adar added a comment - So in this context what does "per se" mean? If there isn't should we ditch the multi branch job type then?
            Hide
            jglick Jesse Glick added a comment -

            Again there are other ways to suppress triggering of builds from branch projects.

            Show
            jglick Jesse Glick added a comment - Again there are other ways to suppress triggering of builds from branch projects.
            Hide
            idanadar Idan Adar added a comment -

            Could you please point to these options? I may have missed it.

            Show
            idanadar Idan Adar added a comment - Could you please point to these options? I may have missed it.
            Hide
            jglick Jesse Glick added a comment -

            A topic for the user list, stackoverflow.com, or #jenkins.

            Show
            jglick Jesse Glick added a comment - A topic for the user list, stackoverflow.com, or #jenkins.
            Hide
            ssbarnea Sorin Sbarnea added a comment -

            From another dimension:

            Here is your new car which looks great and even has an auto-pilot. BTW, we removed the break pedal because it was taking too much space and we moved it inside the trunk. Ask on the forum and people will tell you how they managed to use it.

            Show
            ssbarnea Sorin Sbarnea added a comment - From another dimension: Here is your new car which looks great and even has an auto-pilot. BTW, we removed the break pedal because it was taking too much space and we moved it inside the trunk. Ask on the forum and people will tell you how they managed to use it.
            jglick Jesse Glick made changes -
            Link This issue is blocked by JENKINS-44619 [ JENKINS-44619 ]
            basil Basil Crow made changes -
            Link This issue is blocking JENKINS-47705 [ JENKINS-47705 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-567 (Web Link)" [ 18871 ]
            Show
            boon Joe Harte added a comment - https://issues.jenkins-ci.org/browse/JENKINS-49307
            batmat Baptiste Mathus made changes -
            Link This issue relates to JENKINS-49307 [ JENKINS-49307 ]
            Hide
            mildred Mildred Ki'Lya added a comment -

            This seems solved, however running recent versions of jenkins i cannot see how to disable builds. neither on specific branches or on repositories with multiple branches. Is there any documentation anywhere?

            Show
            mildred Mildred Ki'Lya added a comment - This seems solved, however running recent versions of jenkins i cannot see how to disable builds. neither on specific branches or on repositories with multiple branches. Is there any documentation anywhere?
            Hide
            owenmehegan Owen Mehegan added a comment -

            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.

            Show
            owenmehegan Owen Mehegan added a comment - 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.
            Hide
            wolfgangk Wolfgang Kiendl added a comment -

            For a normal pipeline job I now have the button and can disable it, however it does not appear in views that filter on disabled jobs (List View section, Job Statuses Filter). Is this another bug that should be reported separately because it probably belongs to another component? If so, could you give me a hint which component this might belong to?

            Show
            wolfgangk Wolfgang Kiendl added a comment - For a normal pipeline job I now have the button and can disable it, however it does not appear in views that filter on disabled jobs (List View section, Job Statuses Filter). Is this another bug that should be reported separately because it probably belongs to another component? If so, could you give me a hint which component this might belong to?
            Hide
            danielbeck Daniel Beck added a comment -

            Might be https://plugins.jenkins.io/view-job-filters if you're using that, but core's List view also has a boolean flag to only include enabled jobs. Either, or both.

            Show
            danielbeck Daniel Beck added a comment - Might be https://plugins.jenkins.io/view-job-filters if you're using that, but core's List view also has a boolean flag to only include enabled jobs. Either, or both.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                apemberton Andy Pemberton
              • Votes:
                178 Vote for this issue
                Watchers:
                167 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: