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

Allow configuration/filtering of detected Changes

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Our developers make heavy use of the WIP and Private flags for their Changes. Currently, the plugin finds and attempts to build these changes a bit too eagerly.

      Some configurability in the scanned and filtered changes would be extremely useful. For this use case, a simple control for the search query being used would be sufficient, e.g. we could use status:open -is:wip -is:private.

      Controlling the query would also be immediately extensible to more granular workflows, e.g. using a user-set "ready-for-test" review label as a gate on the Jenkins jobs.

        Attachments

          Activity

          Hide
          zetten Peter van Zetten added a comment -

          The env vars are good enough for now - we can handle the WIP/Private state and omit stages or shortcut the entire build.

          A trait to completely prevent the build job creation would be even better!

          Show
          zetten Peter van Zetten added a comment - The env vars are good enough for now - we can handle the WIP/Private state and omit stages or shortcut the entire build. A trait to completely prevent the build job creation would be even better!
          Hide
          lucamilanesio Luca Domenico Milanesio added a comment -

          Looks good, thanks again Peter van Zetten for raising this, I'll work on that for next release, it should be easy enough to do.

          Show
          lucamilanesio Luca Domenico Milanesio added a comment - Looks good, thanks again Peter van Zetten for raising this, I'll work on that for next release, it should be easy enough to do.
          Hide
          accojohannes Johannes Carlsson added a comment -

          We already avoid building changes marked as private by making sure that the Jenkins user don't have the "View Private Changes" access right. We also have configured Gerrit so that changes are private and wip when uploading:

          [change]
          	privateByDefault = true
          	workInProgressByDefault = true
          
          

           

          Show
          accojohannes Johannes Carlsson added a comment - We already avoid building changes marked as private by making sure that the Jenkins user don't have the "View Private Changes" access right. We also have configured Gerrit so that changes are private and wip when uploading: [change] privateByDefault = true workInProgressByDefault = true  
          Hide
          lucamilanesio Luca Domenico Milanesio added a comment -

          I have added an extra property in the discover open changes trait so that you could define an extra query and impose further restrictions.

          See an example below:

          Show
          lucamilanesio Luca Domenico Milanesio added a comment - I have added an extra property in the discover open changes trait so that you could define an extra query and impose further restrictions. See an example below:
          Hide
          lucamilanesio Luca Domenico Milanesio added a comment -

          A change for this feature is ready for review at:

          https://review.gerrithub.io/c/jenkinsci/gerrit-code-review-plugin/+/494937

          Show
          lucamilanesio Luca Domenico Milanesio added a comment - A change for this feature is ready for review at: https://review.gerrithub.io/c/jenkinsci/gerrit-code-review-plugin/+/494937

            People

            Assignee:
            lucamilanesio Luca Domenico Milanesio
            Reporter:
            zetten Peter van Zetten
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: