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

Allow filtering and selection of parameterized jobs on their parameters

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      All of our builds have a single parameter, Configuration, that has two values, Debug and Release (this corresponds to standard Visual Studio project configuration labels). I'd like to create a view that only shows jobs that have Configuration = Release. As a bonus, if I could bring up this parameter as a column in a view, it'd be even better.

        Attachments

          Activity

          Hide
          jacob_robertson Jacob Robertson added a comment -

          Please see the View Job Filters plugin (http://wiki.jenkins-ci.org/display/JENKINS/View+Job+Filters) and see if the "Filter by Job Parameterization" feature is what you're looking at for the view filtering - I believe it does exactly what you want. If not, please let me know how it could be improved.

          Show
          jacob_robertson Jacob Robertson added a comment - Please see the View Job Filters plugin ( http://wiki.jenkins-ci.org/display/JENKINS/View+Job+Filters ) and see if the "Filter by Job Parameterization" feature is what you're looking at for the view filtering - I believe it does exactly what you want. If not, please let me know how it could be improved.
          Hide
          jacob_robertson Jacob Robertson added a comment -

          Closing this issue, as there is a plugin that can provide what you're asking for. I would personally that prefer if you want the (bonus) column feature, open that as a second ticket, since this issue is really two requests that would likely be solved by different plugins.

          Show
          jacob_robertson Jacob Robertson added a comment - Closing this issue, as there is a plugin that can provide what you're asking for. I would personally that prefer if you want the (bonus) column feature, open that as a second ticket, since this issue is really two requests that would likely be solved by different plugins.
          Hide
          hvmptydvmpty hvmptydvmpty added a comment -

          Jacob, the plug-in you mentioned seems to filter on default value of a parameter while I need to filter out jobs based on actual parameter used for a build. Also, I tried "Name=Configuration" and "Value=Release" in Job Filters parameters for parameterized builds hoping to get only jobs where parameter Configuration is equal to Release, but it shows me all the jobs. I can file a separate ticket for your plug-in but it doesn't seem to be designed for the same purpose, no offense.

          Show
          hvmptydvmpty hvmptydvmpty added a comment - Jacob, the plug-in you mentioned seems to filter on default value of a parameter while I need to filter out jobs based on actual parameter used for a build. Also, I tried "Name=Configuration" and "Value=Release" in Job Filters parameters for parameterized builds hoping to get only jobs where parameter Configuration is equal to Release, but it shows me all the jobs. I can file a separate ticket for your plug-in but it doesn't seem to be designed for the same purpose, no offense.
          Hide
          jacob_robertson Jacob Robertson added a comment - - edited

          You're right that that is not the way this part of the plugin was designed, but I would like to add this enhancement to the view-job-filters plugin. But first I want to make sure we're on the same page. All you're really saying is that the filter should be able to match against the parameter(s) of the last completed build? I have implemented this locally, and tested that it works. But before I commit it I want to make sure that's what you mean.

          So for example, this is the scenario I tested locally: I have a view configured as "Name=Configuration/Value=Release", and it has no jobs showing up in it. I then build a job, choosing the "Configuration" drop down to be "Release", and once that job has completed building, it shows up in the view. Then, I build the job again, but this time choose "Debug" and once that job has completed building, it no longer shows up in that view (but now shows up in another view "Name=Configuration/Value=Debug".

          Show
          jacob_robertson Jacob Robertson added a comment - - edited You're right that that is not the way this part of the plugin was designed, but I would like to add this enhancement to the view-job-filters plugin. But first I want to make sure we're on the same page. All you're really saying is that the filter should be able to match against the parameter(s) of the last completed build? I have implemented this locally, and tested that it works. But before I commit it I want to make sure that's what you mean. So for example, this is the scenario I tested locally: I have a view configured as "Name=Configuration/Value=Release", and it has no jobs showing up in it. I then build a job, choosing the "Configuration" drop down to be "Release", and once that job has completed building, it shows up in the view. Then, I build the job again, but this time choose "Debug" and once that job has completed building, it no longer shows up in that view (but now shows up in another view "Name=Configuration/Value=Debug".
          Hide
          hvmptydvmpty hvmptydvmpty added a comment -

          This sounds better but not exactly what I need. Is it possible that the latest Debug job shows up in view Name=Configuration/Value=Debug and the latest Release job shows in Name=Configuration/Value=Release? To give some background, debug jobs produce packages used by developers on their PCs and in development environment, but anything above development gets release packages. Also, debug jobs are triggered by commits and release ones – manually. So, a developer's daily view is typically a "debug" one while a "release engineer's" (the same developer wearing a different hat, really) is "release."

          Show
          hvmptydvmpty hvmptydvmpty added a comment - This sounds better but not exactly what I need. Is it possible that the latest Debug job shows up in view Name=Configuration/Value=Debug and the latest Release job shows in Name=Configuration/Value=Release ? To give some background, debug jobs produce packages used by developers on their PCs and in development environment, but anything above development gets release packages. Also, debug jobs are triggered by commits and release ones – manually. So, a developer's daily view is typically a "debug" one while a "release engineer's" (the same developer wearing a different hat, really) is "release."
          Hide
          jacob_robertson Jacob Robertson added a comment -

          A while back I released an additional feature to the View Jobs Filters plugin that allows you to configure certain columns to show values for the filtered build. Take a look at this wiki page and see if it's close to what you're asking for.

          https://wiki.jenkins-ci.org/display/JENKINS/Build+Filter+%28Wrapper%29+Column

          Show
          jacob_robertson Jacob Robertson added a comment - A while back I released an additional feature to the View Jobs Filters plugin that allows you to configure certain columns to show values for the filtered build. Take a look at this wiki page and see if it's close to what you're asking for. https://wiki.jenkins-ci.org/display/JENKINS/Build+Filter+%28Wrapper%29+Column
          Hide
          oleg_nenashev Oleg Nenashev added a comment -
          Show
          oleg_nenashev Oleg Nenashev added a comment - Seems to be resolved by https://wiki.jenkins-ci.org/display/JENKINS/View+Job+Filters

            People

            • Assignee:
              Unassigned
              Reporter:
              hvmptydvmpty hvmptydvmpty
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: