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

Clone to directory named for repository

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
    • Similar Issues:
      Show 5 results

      Description

      In a Jenkins Job you can select to use git to clone / pull from multiple repositories but it always pulls straight to the working directory so if you have multiple they end up overwriting each other.

      What I'd like is a checkbox to say clone to a directory (under the workspace) named for the git repository.

      So (when checked) if I had the command as:
      https://github.com/jenkinsci/jenkins.git

      it would checkout to .../workspace/job_name/jenkins

        Issue Links

          Activity

          Hide
          rocco LuFrija added a comment -

          I just wanted to add that using the multiple-SCM plugin leads to an additional problem: the changes (commits and comments) are displayed only for the GIT repo that is set as first SCM.

          Show
          rocco LuFrija added a comment - I just wanted to add that using the multiple-SCM plugin leads to an additional problem: the changes (commits and comments) are displayed only for the GIT repo that is set as first SCM.
          Hide
          marc2112 Marc Breslow added a comment -

          With Multiple-SCM plugin you also don't get the GIT_URL and GIT_SHA for all the repos.

          Show
          marc2112 Marc Breslow added a comment - With Multiple-SCM plugin you also don't get the GIT_URL and GIT_SHA for all the repos.
          Hide
          lievencardoen Lieven Cardoen added a comment -

          Is there already a solution for this without using the multiple-SCM plugin?

          Show
          lievencardoen Lieven Cardoen added a comment - Is there already a solution for this without using the multiple-SCM plugin?
          Hide
          sagayd Sagayaraj David added a comment - - edited

          Doug and Mark are correct to add local directory as the name of the GIT repo itself. In fact, it would be nice have it configured in the global GIT configuration whether to checkout GIT into workspace or workspace\${GIT_REPO}

          Show
          sagayd Sagayaraj David added a comment - - edited Doug and Mark are correct to add local directory as the name of the GIT repo itself. In fact, it would be nice have it configured in the global GIT configuration whether to checkout GIT into workspace or workspace\${GIT_REPO}
          Hide
          mwils2424 Matt Wilson added a comment -

          Agreed Sagayaraj David
          Being unable to clone multiple repositories to distinct folders is causing me some serious pain. I realize that I can manually clone these repos using a shell call, but in doing that I lose pieces of the plugin's functionality that I really like.

          Show
          mwils2424 Matt Wilson added a comment - Agreed Sagayaraj David Being unable to clone multiple repositories to distinct folders is causing me some serious pain. I realize that I can manually clone these repos using a shell call, but in doing that I lose pieces of the plugin's functionality that I really like.

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              thaggie Tom Haggie
            • Votes:
              15 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

              • Created:
                Updated: