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

Allow Git checkout into absolute path

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Not A Defect
    • Icon: Critical Critical

      I tried using "Check out to a sub-directory" option in Git SCM configuration with absolute path to required directory.

      My hope was that word "sub-directory" is just a hint for default behaviour until absolute path is specified.

      But it didn't work:

      java.io.IOException: Failed to mkdirs: /path/to/directory/jenkins/has/required/permissions/for/
      at hudson.FilePath.mkdirs(FilePath.java:1164)
      at hudson.plugins.git.GitSCM.createClient(GitSCM.java:636)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:978)
      at org.jenkinsci.plugins.multiplescms.MultiSCM.checkout(MultiSCM.java:129)
      at hudson.scm.SCM.checkout(SCM.java:485)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1277)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
      at hudson.model.Run.execute(Run.java:1741)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:408)
      Notifying upstream projects of job completion

      I'm using environment where all (chained and inter-related) jobs share common (absolute) local Git repositories.

      Proposed solution

      The same field "Check out to a sub-directory" can be renamed into "Check out to a directory" with explanation that unless path is absolute, the specified directory is relative to workspace.

            ndeloof Nicolas De Loof
            uvsmtid Alexey Pakseykin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: