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

Give the ability to choose how the multibranch subprojects will be named.

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The %2F encoding of / breaks many software (msbuild for example) and can't be changed.
      Being able to provide a rule to build the subproject names from the branch name instead of just encoding things would permit to give the user the power to work around their problems with this kind of software.

      This would be an advanced option in which one can write something like a sed regex.

        Attachments

          Issue Links

            Activity

            Hide
            medianick Nick Jones added a comment -

            Attempting to use '\\?\' as a path prefix – in my case, setting '\\?\C:\Jenkins' as the "Remote root directory" for my JNLP-connected Windows agent – resulted in a "java.nio.file.InvalidPathException: Illegal character [?] in path" exception being thrown, which similar to https://bugs.openjdk.java.net/browse/JDK-8165748 (although I'm using the Oracle JRE8). It would appear that my only options with Windows agents to reduce overall path length (until JENKINS-2111 is implemented) is the use of the '-Djenkins.branch.WorkspaceLocatorImpl.PATH_MAX' parameter, which given the merge of https://github.com/jenkinsci/branch-api-plugin/pull/62 would appear to support generated paths as short as 12 characters, far less than the 80 being generated by default.

            Show
            medianick Nick Jones added a comment - Attempting to use '\\?\' as a path prefix – in my case, setting '\\?\C:\Jenkins' as the "Remote root directory" for my JNLP-connected Windows agent – resulted in a "java.nio.file.InvalidPathException: Illegal character [?] in path" exception being thrown, which similar to https://bugs.openjdk.java.net/browse/JDK-8165748 (although I'm using the Oracle JRE8). It would appear that my only options with Windows agents to reduce overall path length (until JENKINS-2111 is implemented) is the use of the '-Djenkins.branch.WorkspaceLocatorImpl.PATH_MAX' parameter, which given the merge of https://github.com/jenkinsci/branch-api-plugin/pull/62 would appear to support generated paths as short as 12 characters, far less than the 80 being generated by default.
            Hide
            shankar4ever Uma Shankar added a comment - - edited

            Hey guys, this seems to be still a problem with latest LTS Jenkins, I have Jenkins on Windows with a slave. I have used starting parameter as -Djenkins.branch.WorkspaceLocatorImpl.PATH_MAX=2 works well on master, however builds on Node is still creating %2F folder which is breaking all the MSBuild projects

             

            Folder on Master:

             

            Folder on Slaves:

             

            Jenkins Version: Jenkins ver. 2.138.2

            Branch API version: 2.0.20

             

            Is there some specific configuration for slaves?

             

             

            Show
            shankar4ever Uma Shankar added a comment - - edited Hey guys, this seems to be still a problem with latest LTS Jenkins, I have Jenkins on Windows with a slave. I have used starting parameter as -Djenkins.branch.WorkspaceLocatorImpl.PATH_MAX=2 works well on master, however builds on Node is still creating %2F folder which is breaking all the MSBuild projects   Folder on Master:   Folder on Slaves:   Jenkins Version:  Jenkins ver. 2.138.2 Branch API version: 2.0.20   Is there some specific configuration for slaves?    
            Hide
            jglick Jesse Glick added a comment -

            Please do not reopen. If you encounter bugs, file them separately with complete steps to reproduce from scratch. Or just try my proposed implementation of JENKINS-2111, which reduces path lengths considerably.

            Show
            jglick Jesse Glick added a comment - Please do not reopen. If you encounter bugs, file them separately with complete steps to reproduce from scratch. Or just try my proposed implementation of JENKINS-2111 , which reduces path lengths considerably.
            Hide
            shankar4ever Uma Shankar added a comment -

            Jesse Glick Apologies for reopening this issue. Regarding proposed implementation in JENKINS-2111, are you suggesting to use branch-api 2.0.21 ? What does it have different than 2.0.20, would like to know before putting it on production Jenkins instance?

             

            Also, JENKINS-2111 looks more about cleanup than fixing multi branch workspace folder name.

            Show
            shankar4ever Uma Shankar added a comment - Jesse Glick Apologies for reopening this issue. Regarding proposed implementation in JENKINS-2111 , are you suggesting to use branch-api 2.0.21 ? What does it have different than 2.0.20, would like to know before putting it on production Jenkins instance?   Also,  JENKINS-2111  looks more about cleanup than fixing multi branch workspace folder name.
            Hide
            jglick Jesse Glick added a comment -

            are you suggesting to use branch-api 2.0.21 ?

            When released. Or you can install a build from my PR today.

            What does it have different than 2.0.20

            A completely different system for selecting and managing workspace paths. Best discussed in the other issue or PR.

            Show
            jglick Jesse Glick added a comment - are you suggesting to use branch-api 2.0.21 ? When released. Or you can install a build from my PR today. What does it have different than 2.0.20 A completely different system for selecting and managing workspace paths. Best discussed in the other issue or PR.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                rkutic Kevin Grandemange
              • Votes:
                59 Vote for this issue
                Watchers:
                82 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: