• Icon: New Feature New Feature
    • Resolution: Fixed
    • Icon: Minor Minor
    • git-plugin
    • None

      For having several regions to be excluded from build its better to filter the building process only for some included regions.

      [Description copied from http://issues.hudson-ci.org/browse/HUDSON-7294]

          [JENKINS-11749] Included regions feature for GitSCM plugin

          +1 for this feature (voting doesn't work)

          David Brailovsky added a comment - +1 for this feature (voting doesn't work)

          We need the same feature. We have like 7 projects in the same Git repo. And keeping updated the exclude list for all the jobs is time consuming and error prone. Since almost any system out there like ANT and Maven always have both exclude and include filters that seem to be a resonable feature to ask for.

          Sebastien Tardif added a comment - We need the same feature. We have like 7 projects in the same Git repo. And keeping updated the exclude list for all the jobs is time consuming and error prone. Since almost any system out there like ANT and Maven always have both exclude and include filters that seem to be a resonable feature to ask for.

          Gregory Pakosz added a comment - - edited

          I would love to see this added to GitSCM. Our repo contains multiple component with separate build systems and such an included regions filter would be really useful.

          Also Juerg did the job in the following pull request: https://github.com/jenkinsci/git-plugin/pull/49

          Gregory Pakosz added a comment - - edited I would love to see this added to GitSCM. Our repo contains multiple component with separate build systems and such an included regions filter would be really useful. Also Juerg did the job in the following pull request: https://github.com/jenkinsci/git-plugin/pull/49

          Code changed in jenkins
          User: Nicolas De loof
          Path:
          src/main/java/hudson/plugins/git/GitSCM.java
          src/main/resources/hudson/plugins/git/GitSCM/config.jelly
          src/main/webapp/help-includedRegions.html
          src/test/java/hudson/plugins/git/GitSCMTest.java
          http://jenkins-ci.org/commit/git-plugin/57f504fc7a687108b24a9684cc704a8c8d7a3932
          Log:
          Merge pull request #49 from juergh/add-included-regions

          [FIXED JENKINS-11749] Included regions feature for GitSCM plugin

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De loof Path: src/main/java/hudson/plugins/git/GitSCM.java src/main/resources/hudson/plugins/git/GitSCM/config.jelly src/main/webapp/help-includedRegions.html src/test/java/hudson/plugins/git/GitSCMTest.java http://jenkins-ci.org/commit/git-plugin/57f504fc7a687108b24a9684cc704a8c8d7a3932 Log: Merge pull request #49 from juergh/add-included-regions [FIXED JENKINS-11749] Included regions feature for GitSCM plugin

          dogfood added a comment -

          Integrated in plugins_git-plugin #298
          [FIXED JENKINS-11749] Included regions feature for GitSCM plugin (Revision 15755928fefaa1e343dcbadba3652e54758e8567)

          Result = SUCCESS
          juerg.haefliger : 15755928fefaa1e343dcbadba3652e54758e8567
          Files :

          • src/main/resources/hudson/plugins/git/GitSCM/config.jelly
          • src/main/java/hudson/plugins/git/GitSCM.java
          • src/main/webapp/help-includedRegions.html
          • src/test/java/hudson/plugins/git/GitSCMTest.java

          dogfood added a comment - Integrated in plugins_git-plugin #298 [FIXED JENKINS-11749] Included regions feature for GitSCM plugin (Revision 15755928fefaa1e343dcbadba3652e54758e8567) Result = SUCCESS juerg.haefliger : 15755928fefaa1e343dcbadba3652e54758e8567 Files : src/main/resources/hudson/plugins/git/GitSCM/config.jelly src/main/java/hudson/plugins/git/GitSCM.java src/main/webapp/help-includedRegions.html src/test/java/hudson/plugins/git/GitSCMTest.java

          I'm very interested in the Included regions feature for GitSCM plugin and have been testing it
          via SCM polling and Git hook.

          I could see that in some cases the jobs were not triggered whereas some changes have been made in the included regions.

          After some more testing I discovered that if several commits are made, only the last commit seems to be taken into account.

          Spying the gitcommand the plugin is using I could see :

          git rev-parse --verify HEAD
          git command : fetch -t https://url.git +refs/heads/*:refs/remotes/origin/* 
          git tag -l master
          git command : rev-parse origin/master^{commit} 
            -> Gives the new SHA1
          git command : show --no-abbrev --format=raw -M --raw 'new sha1' 
          

          The last command shows only diff from latest sha1, should't it be something like :

          git show --no-abbrev --format=raw -M --raw 'old sha1'..'new sha1' 
          

          'old sha1' beeing the sha1 of the latest build.

          Can you confirm there is a bug or have I something wrong in my setup ?

          Thanks,

          Bertrand

          Bertrand Latinville added a comment - I'm very interested in the Included regions feature for GitSCM plugin and have been testing it via SCM polling and Git hook. I could see that in some cases the jobs were not triggered whereas some changes have been made in the included regions. After some more testing I discovered that if several commits are made, only the last commit seems to be taken into account. Spying the gitcommand the plugin is using I could see : git rev-parse --verify HEAD git command : fetch -t https://url.git +refs/heads/*:refs/remotes/origin/* git tag -l master git command : rev-parse origin/master^{commit} -> Gives the new SHA1 git command : show --no-abbrev --format=raw -M --raw 'new sha1' The last command shows only diff from latest sha1, should't it be something like : git show --no-abbrev --format=raw -M --raw 'old sha1' .. 'new sha1' 'old sha1' beeing the sha1 of the latest build. Can you confirm there is a bug or have I something wrong in my setup ? Thanks, Bertrand

            juergh Juerg Haefliger
            juergh Juerg Haefliger
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: