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

Add support for sparse checkouts in submodules

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The Jenkins Git plugin currently supports sparse checkouts and submodules, but not sparse checkouts of a submodule. I would like to do a sparse checkout of a submodule.

      It looks like the submodule has its own .git/info/sparse-checkout file that needs to be modified at ${REPO}/.git/modules/${SUBMODULE_PATH}/info/sparse-checkout to make this work.

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          Thanks for the suggestion.  Unfortunately, it has the same user interface challenges as the proposal to support submodule authentication with different credentials for each submodule.

          In both cases, the list of submodules (which may vary by branch) needs to be presented to the user so that the can define the sparse checkout configuration for that submodule.

          I don't expect to ever implement this enhancement request due to the complexity it will create in the user experience.

          Show
          markewaite Mark Waite added a comment - Thanks for the suggestion.  Unfortunately, it has the same user interface challenges as the proposal to support submodule authentication with different credentials for each submodule. In both cases, the list of submodules (which may vary by branch) needs to be presented to the user so that the can define the sparse checkout configuration for that submodule. I don't expect to ever implement this enhancement request due to the complexity it will create in the user experience.
          Hide
          fluffysquirrels Alex H added a comment -

          Thanks for the response, Mark.

          Yes, the UI you describe does sound like quite a lot of work. I'd be happy with a simpler alternative, e.g. where the user can enter the module path themselves in a text box and there was a warning or error reported when the build ran if that module path was not present. I feel this would be fairly easy to implement and would certainly handle my use-case. I consider sparse checkout a disk space optimisation, so the consequences of incorrect configuration are less severe than other submodule parameters.

          What do you think about this option?

          Show
          fluffysquirrels Alex H added a comment - Thanks for the response, Mark. Yes, the UI you describe does sound like quite a lot of work. I'd be happy with a simpler alternative, e.g. where the user can enter the module path themselves in a text box and there was a warning or error reported when the build ran if that module path was not present. I feel this would be fairly easy to implement and would certainly handle my use-case. I consider sparse checkout a disk space optimisation, so the consequences of incorrect configuration are less severe than other submodule parameters. What do you think about this option?
          Hide
          markewaite Mark Waite added a comment -

          It just doesn't sound simple enough for my preferences.

          Show
          markewaite Mark Waite added a comment - It just doesn't sound simple enough for my preferences.
          Hide
          fluffysquirrels Alex H added a comment -

          OK, thanks for your input. I already have scripts in build steps implementing this for me, so will probably stick with this in my current project. I might try and document this approach on the wiki or in a blog post at some point.

          Show
          fluffysquirrels Alex H added a comment - OK, thanks for your input. I already have scripts in build steps implementing this for me, so will probably stick with this in my current project. I might try and document this approach on the wiki or in a blog post at some point.

            People

            • Assignee:
              Unassigned
              Reporter:
              fluffysquirrels Alex H
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: