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

Jenkins cant display multijob view graphically if the multijob phase is wrapped in a conditional buildstep

      The conditional buildstep plug-in allows you to specify a multijob phase as build step.
      However, the graphical display of a multijob phase is lost when a multijob phase is nested in a conditional build step which means it is not very useful as the user can't view it running except in the console log rather than the multijob screen.
      It would be very helpful to use conditional buildsteps in the multijob plugin and maintain this graphical representation.
      So could the code be altered so that conditional buildsteps that have a multijob phase as a build step are still displayed by the multijob plugin. Conditional logic is very important when promoting job reuse and not having it means I currently have to have Multijob calling conditional logic job that will run sub-jobs based on the parameters passed by the Multijob. Having conditional logic available to multijob will mean I can have multijob calling jobs directly without the added layer of the conditional job in between and would also allow better visulisation for the end user of all the jobs that are running.

          [JENKINS-16870] Jenkins cant display multijob view graphically if the multijob phase is wrapped in a conditional buildstep

          Assigning this to someone from tikal.

          I'm the maintainer of the conditional buildstep plugin - if you could give me a hint on how I can tell your plugin that a multijob phase is nested within a conditional buildstep - let me know and I can implement it.

          Dominik Bartholdi added a comment - Assigning this to someone from tikal. I'm the maintainer of the conditional buildstep plugin - if you could give me a hint on how I can tell your plugin that a multijob phase is nested within a conditional buildstep - let me know and I can implement it.

          Have you actually started work on implementing this feature?

          steven armstrong added a comment - Have you actually started work on implementing this feature?

          No, as I have no idea on where to publish the information about the contained/wrapped MultiJobBuilders.

          With this line of code, you have a simple way to access all the builders, from within the project and you should have all the information to display the jobs:

          List<MultiJobBuilder> containedMultiJobBuilders = org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuildStepHelper.getContainedBuilders(project, MultiJobBuilder.class);
          

          are you going to implement it?

          Dominik Bartholdi added a comment - No, as I have no idea on where to publish the information about the contained/wrapped MultiJobBuilders. With this line of code, you have a simple way to access all the builders, from within the project and you should have all the information to display the jobs: List<MultiJobBuilder> containedMultiJobBuilders = org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuildStepHelper.getContainedBuilders(project, MultiJobBuilder.class); are you going to implement it?

          I wouldn't know how to implement it myself. I just wondered about the status as this issue had been moved to In Progress so I thought someone was working on it given the status was changed...

          steven armstrong added a comment - I wouldn't know how to implement it myself. I just wondered about the status as this issue had been moved to In Progress so I thought someone was working on it given the status was changed...

          to "in progress" was started by Arpit Nagar (arpitgold)...
          Arbit, are you working on this?

          Dominik Bartholdi added a comment - to "in progress" was started by Arpit Nagar (arpitgold)... Arbit, are you working on this?

          Dominik Bartholdi added a comment - added PR: https://github.com/jenkinsci/tikal-multijob-plugin/pull/29

          Code changed in jenkins
          User: imod
          Path:
          pom.xml
          src/main/java/com/tikal/jenkins/plugins/multijob/views/MultiJobView.java
          src/main/java/com/tikal/jenkins/plugins/multijob/views/PhaseWrapper.java
          src/main/resources/com/tikal/jenkins/plugins/multijob/views/JobColumn/column.jelly
          src/test/java/com/tikal/jenkins/plugins/multijob/test/ConditionalPhaseTest.java
          http://jenkins-ci.org/commit/tikal-multijob-plugin/11b6d2e7629146ea4c8555f5fd57aac1cde27807
          Log:
          [FIXED JENKINS-17576] [FIXED JENKINS-16870] support conditional buildstep plugin

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: imod Path: pom.xml src/main/java/com/tikal/jenkins/plugins/multijob/views/MultiJobView.java src/main/java/com/tikal/jenkins/plugins/multijob/views/PhaseWrapper.java src/main/resources/com/tikal/jenkins/plugins/multijob/views/JobColumn/column.jelly src/test/java/com/tikal/jenkins/plugins/multijob/test/ConditionalPhaseTest.java http://jenkins-ci.org/commit/tikal-multijob-plugin/11b6d2e7629146ea4c8555f5fd57aac1cde27807 Log: [FIXED JENKINS-17576] [FIXED JENKINS-16870] support conditional buildstep plugin

          Code changed in jenkins
          User: Haggai Philip Zagury
          Path:
          pom.xml
          src/main/java/com/tikal/jenkins/plugins/multijob/views/MultiJobView.java
          src/main/java/com/tikal/jenkins/plugins/multijob/views/PhaseWrapper.java
          src/main/resources/com/tikal/jenkins/plugins/multijob/views/JobColumn/column.jelly
          src/test/java/com/tikal/jenkins/plugins/multijob/test/ConditionalPhaseTest.java
          http://jenkins-ci.org/commit/tikal-multijob-plugin/42dcdb7f1e19a609d260e425919f87354492dd25
          Log:
          Merge pull request #29 from imod/support-conditional-buildstep

          [FIXED JENKINS-17576] [FIXED JENKINS-16870] support conditional buildstep plugin

          Compare: https://github.com/jenkinsci/tikal-multijob-plugin/compare/f9336d97b8ca...42dcdb7f1e19

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Haggai Philip Zagury Path: pom.xml src/main/java/com/tikal/jenkins/plugins/multijob/views/MultiJobView.java src/main/java/com/tikal/jenkins/plugins/multijob/views/PhaseWrapper.java src/main/resources/com/tikal/jenkins/plugins/multijob/views/JobColumn/column.jelly src/test/java/com/tikal/jenkins/plugins/multijob/test/ConditionalPhaseTest.java http://jenkins-ci.org/commit/tikal-multijob-plugin/42dcdb7f1e19a609d260e425919f87354492dd25 Log: Merge pull request #29 from imod/support-conditional-buildstep [FIXED JENKINS-17576] [FIXED JENKINS-16870] support conditional buildstep plugin Compare: https://github.com/jenkinsci/tikal-multijob-plugin/compare/f9336d97b8ca...42dcdb7f1e19

          hagzag added a comment -

          hagzag added a comment - Fixed in PR #29 https://github.com/jenkinsci/tikal-multijob-plugin/pull/29

          Great news that this has been implemented thanks to Dominik. Any ETA on when the new release will be out with this change included?

          steven armstrong added a comment - Great news that this has been implemented thanks to Dominik. Any ETA on when the new release will be out with this change included?

            domi Dominik Bartholdi
            stevenarmstrong steven armstrong
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: