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

Multibranch job should have an option to shorten the job/script directory

      Currently, default folder that multibranch jobs generate like this: le-somebranch-ASGYKAZV7Q4KRP2NV67WCQADFFGHWAQZYCPLVZ34EWIIFVJO5HWA@script 

      This will cause problem for windows user who has long path in their repositories like me. In build node, I can specify a workspace directory to checkout but in this case I can not do anything else. Because the checkout will be failed on master before it can read the Jenkinsfile.

       

      hudson.plugins.git.GitException: Could not checkout 26b0ae8980a8da3214f0256c083f5daa11c45e6d
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$9.execute(CliGitAPIImpl.java:2101)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1139)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:109)
      at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:130)
      at org.jenkinsci.plugins.workflow.multibranch.SCMBinder.create(SCMBinder.java:107)
      at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:232)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:405)
      Caused by: hudson.plugins.git.GitException: Command "git.exe checkout -f 26b0ae8980a8da3214f0256c083f5daa11c45e6d" returned status code 1:
      stdout: 
      stderr: error: unable to create file path/to/file Filename too long
      

       

          [JENKINS-42923] Multibranch job should have an option to shorten the job/script directory

          Hung Vo created issue -
          Matthew DeTullio made changes -
          Component/s New: branch-api-plugin [ 18621 ]
          Component/s New: pipeline [ 21692 ]
          Component/s New: workflow-multibranch-plugin [ 21465 ]
          Component/s Original: multi-branch-project-plugin [ 21127 ]
          Matthew DeTullio made changes -
          Assignee Original: Matthew DeTullio [ mjdetullio ] New: Stephen Connolly [ stephenconnolly ]
          Stephen Connolly made changes -
          Link New: This issue duplicates JENKINS-34564 [ JENKINS-34564 ]
          Stephen Connolly made changes -
          Resolution New: Duplicate [ 3 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          Lars Immisch made changes -
          Comment [ For me, this is a terrible problem.

          I could work around the git problems following the suggestions in https://issues.jenkins-ci.org/browse/JENKINS-18951, so I can checkout the branch for the multibranch pipeline, but even with a short remote root directory, the path is so long that vs2017 will not compile my project with a path too long error:

          {{Error MSB4198 The expression "DirectoryName" cannot be evaluated on item "<very long filename.cpp.obj>". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.}} ]

            stephenconnolly Stephen Connolly
            hungvotrung Hung Vo
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: