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

Invalid workspace path for pipeline jobs on jenkins master

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • pipeline
    • Jenkins 2.7.3
      Pipeline 2.4
      Multibranch 2.9

      There seems to be a recent change in strategy on how folders are organized in workspace folder on Jenkins master for first stage SCM checkouts from multibranch jobs. Previously they used to be nested folders now they are not.

      My problem is, there seems to be a size limit on the workspace subfolder name and you are cropping the git repository name, which is causing some maintenance problems. e.g.

      A pull request to a Git repository name 'navigation extension' is cropped to some thing like this:

      avigation-extension_PR-2464-KJBGB3QGPGBXAOYPEHJ33MLLSHZ5D7E5YXNLYLFVQGYPXWOKA4CQ@script
      

      Another one 'aws-infrastructure-data' is something like:

      -infrastructure-data_master-O7PVEBG7YU24BDNRZTSG3VBPTCGPVWE5PF2OZ35TBWNASAJB2OOA@script
      

      so naturally you cannot do something like:

      $ cd -infrastructure-data_master-O7PVEBG7YU24BDNRZTSG3VBPTCGPVWE5PF2OZ35TBWNASAJB2OOA@script
      -bash: cd: -i: invalid option
      cd: usage: cd [-L|[-P [-e]] [-@]] [dir]
      

      Secondly, the path seems to be too long which can also create some problems.

          [JENKINS-38506] Invalid workspace path for pipeline jobs on jenkins master

          Hans Schulz added a comment -

          This is affecting me, too.
          I'd also like to know the reason behind this change, a link to the corresponding issue or pull request would be great.

          Hans Schulz added a comment - This is affecting me, too. I'd also like to know the reason behind this change, a link to the corresponding issue or pull request would be great.

          Nick Archibald added a comment - - edited

          This problem is causing a problem on windows machines as the path is now too long to check out all the code and restore nuget, npm and bower packages. It also looks like the change has broken the use of the 'Workspace Root Directory' configuration as none of the code is being checked out to the provided directory it is just being checked out to the default Jenkins workspace path.

          So in short my Companies build environment is now broken

          Nick Archibald added a comment - - edited This problem is causing a problem on windows machines as the path is now too long to check out all the code and restore nuget, npm and bower packages. It also looks like the change has broken the use of the 'Workspace Root Directory' configuration as none of the code is being checked out to the provided directory it is just being checked out to the default Jenkins workspace path. So in short my Companies build environment is now broken

          Mike Delaney added a comment -

          archie_balls while maybe not the best thing, you could use the 'ws' command to set a custom workspace for the build.

          Mike Delaney added a comment - archie_balls while maybe not the best thing, you could use the 'ws' command to set a custom workspace for the build.

          Thanks Mike. The 'ws' command has "worked around" the problem for the time being. Obviously this needs to be corrected.

          Nick Archibald added a comment - Thanks Mike. The 'ws' command has "worked around" the problem for the time being. Obviously this needs to be corrected.

          I can see, that issue was resolved as duplicate, but no issue was linked as a duplicate. Shouldn't this be re-opened?

          Miłosz Kosobucki added a comment - I can see, that issue was resolved as duplicate, but no issue was linked as a duplicate. Shouldn't this be re-opened?

            Unassigned Unassigned
            nikk699 Faheem Nadeem
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: