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

Support for recursive retrieval of submodules

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • git-plugin
    • None

    Description

      The git SCM plugin should provide the ability to automatically retrieve all submodules recursively. Developers often setup their repos to have a recursive submodule structure. It also doesn't make sense to have to manually enter git submodule update commands in the build shell commands just to initialize things properly.

      Recursive submodule retrieval (update) can be easily done using the '--recursive' option which is available in git 1.6.5. This option should be disabled by default.

      I've attached a patch that will implement this (see recursiveSubmodules-patch.diff). This patch was applied to commit 6c842954608. It also contains code to recursively clean the workspace's submodules if the 'Clean after checkout' option is selected.

      Attachments

        Activity

          bvakili bvakili created issue -
          abayer Andrew Bayer made changes -
          Field Original Value New Value
          Assignee jbq [ jbq ] abayer [ abayer ]
          dogfood dogfood added a comment -

          Integrated in plugins_hudson-git-plugin #26
          JENKINS-6258 Added support for --recursive calls to submodule commands

          Andrew Bayer :
          Files :

          • src/main/java/hudson/plugins/git/GitAPI.java
          • src/main/resources/hudson/plugins/git/GitSCM/config.jelly
          • src/main/java/hudson/plugins/git/IGitAPI.java
          • src/main/webapp/help-recursiveSubmodules.html
          • src/main/java/hudson/plugins/git/GitSCM.java
          • src/test/java/hudson/plugins/git/GitSCMTest.java
          dogfood dogfood added a comment - Integrated in plugins_hudson-git-plugin #26 JENKINS-6258 Added support for --recursive calls to submodule commands Andrew Bayer : Files : src/main/java/hudson/plugins/git/GitAPI.java src/main/resources/hudson/plugins/git/GitSCM/config.jelly src/main/java/hudson/plugins/git/IGitAPI.java src/main/webapp/help-recursiveSubmodules.html src/main/java/hudson/plugins/git/GitSCM.java src/test/java/hudson/plugins/git/GitSCMTest.java
          abayer Andrew Bayer made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          fabb Fabian E added a comment -

          This patch should be incorporated since v1.1 according to the changelog.
          Still, I've got a similar problem: https://issues.jenkins-ci.org/browse/JENKINS-15405

          fabb Fabian E added a comment - This patch should be incorporated since v1.1 according to the changelog. Still, I've got a similar problem: https://issues.jenkins-ci.org/browse/JENKINS-15405
          fabb Fabian E added a comment -

          Got it, there is a (pretty hidden) option to turn that behavior on.

          fabb Fabian E added a comment - Got it, there is a (pretty hidden) option to turn that behavior on.
          markewaite Mark Waite made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 136351 ] JNJira + In-Review [ 203987 ]

          People

            abayer Andrew Bayer
            bvakili bvakili
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: