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

Pipeline in Multi-branch mode creates too long workspace folder name

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • Jenkins 2.89.3
      Multibranch 2.16

      When Pipeline is running in Multibranch mode, the workspace directory is extremely long due to the inclusion of a full GIT hash (52 characters), such as: "/home/jenkins/workspace/funk_experimental_lauenburg-XCXMZWWG24Y2ZJAFNYCNOHRMYYWMVD5GBJJRU75H46UN5SAKC44A/master"

      This easily triggers Linux's limit for a shebang on shell scripts (e.g. when creating a Python virtualenv) that are created as part of the build process if they include locally scoped paths, usually causing errors mentioning a "Bad interpreter".

      Considering the extremely small limit of Linux in terms of shebang length, I propose Multibranch does not waste almost all of it on git hash and branch name and useses a tempdir concept instead.

      This is documented in dozens of pre-existing issues (if you do a web search for jenkins multibranch bad interpreter):

      https://github.com/freifunk-gluon/gluon/issues/1120

      https://github.com/pypa/virtualenv/issues/596

      https://groups.google.com/forum/#!topic/jenkinsci-users/15KeeiZCxBs

       

            Unassigned Unassigned
            rbuchholz Robert Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: