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:

      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

        Attachments

          Issue Links

            Activity

            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.
            Hide
            leonov Pavel Leonov added a comment -

            With Multiple-SCM Jenkins doesn't show repo changes for each build, this part in the summary is always empty

            Show
            leonov Pavel Leonov added a comment - With Multiple-SCM Jenkins doesn't show repo changes for each build, this part in the summary is always empty

              People

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

                Dates

                • Created:
                  Updated: