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

Next Build Number plugin doesn't work for Workflow or Multi-branch Workflow jobs

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Minor Minor
    • Jenkins ver. 1.644
      Workflow/Pipeline Plugins: 1.12
      Next Build Number Plugin: 1.3

      The Set Next Build Number menu link does not show up for Workflow or Multi-branch Workflow/Pipeline projects. See attached images of link present on a freestyle project, but missing on the workflow project, and on the multibranch workflow child/branch projects.

          [JENKINS-33046] Next Build Number plugin doesn't work for Workflow or Multi-branch Workflow jobs

          Jeff Burke created issue -

          Any obvious errors in the logs? (either on startup, during job creation, or while displaying the page) I currently don't have Workflow installed in any of my instances and may not have the opportunity for a bit.

          Alexander Komarov added a comment - Any obvious errors in the logs? (either on startup, during job creation, or while displaying the page) I currently don't have Workflow installed in any of my instances and may not have the opportunity for a bit.

          Jeff Burke added a comment -

          No errors on reboot. And, no messages in the logs when i visit a workflow project or a multi-branch workflow sub-project (the projects auto-created under the project folder).

          Btw, it also doesn't show up in dropdown menus of the projects either (but does show up for Freestyle project dropdown menus).

          Jeff Burke added a comment - No errors on reboot. And, no messages in the logs when i visit a workflow project or a multi-branch workflow sub-project (the projects auto-created under the project folder). Btw, it also doesn't show up in dropdown menus of the projects either (but does show up for Freestyle project dropdown menus).

          Daniel Beck added a comment -

          These jobs aren't AbstractProjects, so
          https://github.com/jenkinsci/next-build-number-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/nextbuildnumber/NextBuildNumberAction.java#L94
          does not apply.

          TransientActionFactory<Job> or similar is probably the better choice.

          Daniel Beck added a comment - These jobs aren't AbstractProjects, so https://github.com/jenkinsci/next-build-number-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/nextbuildnumber/NextBuildNumberAction.java#L94 does not apply. TransientActionFactory<Job> or similar is probably the better choice.

          Pull request with suggested change created: https://github.com/jenkinsci/next-build-number-plugin/pull/5
          I've tried in my local environment, seems to be working fine for both pipeline and freestyle projects.

          Alexander Kanevskiy added a comment - Pull request with suggested change created: https://github.com/jenkinsci/next-build-number-plugin/pull/5 I've tried in my local environment, seems to be working fine for both pipeline and freestyle projects.

          Alexander Komarov added a comment - - edited

          Version 1.4 includes changes by kad, thanks for that. Works for Pipeline jobs in my testing.

          The new version has been pushed and should show up shortly.

          Alexander Komarov added a comment - - edited Version 1.4 includes changes by kad , thanks for that. Works for Pipeline jobs in my testing. The new version has been pushed and should show up shortly.
          Alexander Komarov made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]

          Bryden Oliver added a comment -

          Looks like it now works for Pipeline but not multibranch WorkFlow jobs.

          Bryden Oliver added a comment - Looks like it now works for Pipeline but not multibranch WorkFlow jobs.

          Does it make sense to set it for multibranch jobs? They are intended to be volatile (as branches come and go).

          Alexander Komarov added a comment - Does it make sense to set it for multibranch jobs? They are intended to be volatile (as branches come and go).

          Bryden Oliver added a comment -

          I know in our environment, we've completely ditched all other builds and use the Multibranch Workflow entirely.
          We keep a branch open for each currently supported release of our software, but would like to be able to assign a build number to those release branches as they are not transient.
          I completely agree for all the feature development branches, but for software shipped to customers and supported for several releases, a few branches would be very useful to be able to set a build number on.
          I'm aware of a number of other organisations in a similar boat as we had a chat at a recent meetup and this particular issue came up.

          Bryden Oliver added a comment - I know in our environment, we've completely ditched all other builds and use the Multibranch Workflow entirely. We keep a branch open for each currently supported release of our software, but would like to be able to assign a build number to those release branches as they are not transient. I completely agree for all the feature development branches, but for software shipped to customers and supported for several releases, a few branches would be very useful to be able to set a build number on. I'm aware of a number of other organisations in a similar boat as we had a chat at a recent meetup and this particular issue came up.

            akom Alexander Komarov
            potatopankakes Jeff Burke
            Votes:
            8 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: