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

Filter change log based on included/excluded regions

      When using Included/Excluded regions, allow filtering of the changelog to only commits that match the included/excluded rules.

      If a git repo has multiple projects that are built independently, we use included/excluded regions to trigger builds only when changes are made to one of those projects. However, when it does build, it includes commits that affect files outside of that region in the chnagelog. This becomes more of a problem when used in conjunction with Jira issue updating, because a build that is building only component A will add build SUCCESS/FAILURE comments to a Jira issue that is related to component B even though this job did not build component B.

      This ticket is like JENKINS-10449 which led to changes supporting this in the SVN components.

          [JENKINS-24461] Filter change log based on included/excluded regions

          Mark Waite added a comment -

          I assume that you're asking to filter the changelog, not to filter the actual commits used to perform the build, since the commits used to perform the build cannot be brought into the working directory independent of their preceding commits, whether or not those preceding commits satisfy any inclusion or exclusion criteria.

          Can you confirm that is what you're requesting?

          Mark Waite added a comment - I assume that you're asking to filter the changelog, not to filter the actual commits used to perform the build, since the commits used to perform the build cannot be brought into the working directory independent of their preceding commits, whether or not those preceding commits satisfy any inclusion or exclusion criteria. Can you confirm that is what you're requesting?

          Dan Glanzmann added a comment -

          I can not speak for my namesake, but yes to filter the changelog is exactly what I need for my project.

          We have two jenkins jobs building different projects stored in a common git repository. Currently we have with this setup the list of all changes of both jobs in the changelog and need a possibility to filter only the interesting source paths (pom.xml or included/excluded job rule) for the project.

          Dan Glanzmann added a comment - I can not speak for my namesake, but yes to filter the changelog is exactly what I need for my project. We have two jenkins jobs building different projects stored in a common git repository. Currently we have with this setup the list of all changes of both jobs in the changelog and need a possibility to filter only the interesting source paths (pom.xml or included/excluded job rule) for the project.

          Dan Gradl added a comment -

          Correct Mark, just the changelog. Obviously the actual commits are still there.

          Dan Gradl added a comment - Correct Mark, just the changelog. Obviously the actual commits are still there.

          nick mouton added a comment -

          Would love to see this fixed!

          nick mouton added a comment - Would love to see this fixed!

          Just FYI, there is a pull request on the git-client-plugin in preparation for this: https://github.com/jenkinsci/git-client-plugin/pull/279

          There is also a corresponding change in the git-plugin that uses it: https://github.com/ansig/git-plugin/commit/7e6de1ee3c9c2e7442cc4b59e61fd4ce01073ff8

          Anders Sigfridsson added a comment - Just FYI, there is a pull request on the git-client-plugin in preparation for this: https://github.com/jenkinsci/git-client-plugin/pull/279 There is also a corresponding change in the git-plugin that uses it: https://github.com/ansig/git-plugin/commit/7e6de1ee3c9c2e7442cc4b59e61fd4ce01073ff8

          Shannon Kerr added a comment -

          Would be good to see this fixed.

          Shannon Kerr added a comment - Would be good to see this fixed.

          Thomas added a comment -

          Is there any update to this? While I can see pull request ansig refers to has been merged, I am unable to filter the changelog with the Sparse-checkout extension.

          Thomas added a comment - Is there any update to this? While I can see pull request ansig refers to has been merged, I am unable to filter the changelog with the Sparse-checkout extension.

          Mark Waite added a comment -

          thommelutten the git client plugin pull request referenced by Anders has not been merged. It has been closed without being merged. I don't intend to add this feature to the git plugin. I consider it too narrowly focused for the broad range of users of the git plugin.

          Mark Waite added a comment - thommelutten the git client plugin pull request referenced by Anders has not been merged. It has been closed without being merged. I don't intend to add this feature to the git plugin. I consider it too narrowly focused for the broad range of users of the git plugin.

          Thomas added a comment -

          markewaite thanks for the quick reply. Wouldn't the addition however make it possible to easier support monorepo structures?

          Thomas added a comment - markewaite thanks for the quick reply. Wouldn't the addition however make it possible to easier support monorepo structures?

            Unassigned Unassigned
            dgradl Dan Gradl
            Votes:
            7 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: