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

Included regions feature for GitSCM plugin

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Similar Issues:

      Description

      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]

        Attachments

          Activity

          Hide
          davidbrai David Brailovsky added a comment -

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

          Show
          davidbrai David Brailovsky added a comment - +1 for this feature (voting doesn't work)
          Hide
          sebtardif 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.

          Show
          sebtardif 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.
          Hide
          gpakosz 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

          Show
          gpakosz 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
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          dogfood 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
          Show
          dogfood 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
          Hide
          blatinville 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

          Show
          blatinville 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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: