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

Want an option to encode slashes in branch names differently

      Original reporter kazssym

      As issue #11 wrote, slashes in branch names are currently stored as %2F on the file system, but some application containers (I use GlassFish) do not like it in a URL. So I request an enhancement to add an option to encode slashes (or other special characters) differently, such as replacing with safe characters like '_' or something like that.

          [JENKINS-32253] Want an option to encode slashes in branch names differently

          Matthew DeTullio created issue -
          Matthew DeTullio made changes -
          Description Original: As issue #11 wrote, slashes in branch names are currently stored as %2F on the file system, but some application containers (I use GlassFish) do not like it in a URL. So I request an enhancement to add an option to encode slashes (or other special characters) differently, such as replacing with safe characters like '_' or something like that. New: Original reporter [~kazssym]

          As issue #11 wrote, slashes in branch names are currently stored as %2F on the file system, but some application containers (I use GlassFish) do not like it in a URL. So I request an enhancement to add an option to encode slashes (or other special characters) differently, such as replacing with safe characters like '_' or something like that.
          jorge alves made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]

          jorge alves added a comment -

          Requesting to change this report to major.

          MsBuild based builds are broken when using relative paths to reference files.

          Example: referencing the file "..\..\directory\assembly.dll" makes msbuild resolve it into an absolute path. If this absolute path contains "%xx" it will replace it with the corresponding ascii character. %2F will therefore be decoded to "/" and break the build.

          jorge alves added a comment - Requesting to change this report to major. MsBuild based builds are broken when using relative paths to reference files. Example: referencing the file "..\..\directory\assembly.dll" makes msbuild resolve it into an absolute path. If this absolute path contains "%xx" it will replace it with the corresponding ascii character. %2F will therefore be decoded to "/" and break the build.

          brice maron added a comment -

          it seems that this issue is affecting a bunch of users as 4 of the 5 Pull-request are about this kind of problems with the "/" encoded in the directory name.

          might want to do smth here.

          brice maron added a comment - it seems that this issue is affecting a bunch of users as 4 of the 5 Pull-request are about this kind of problems with the "/" encoded in the directory name. might want to do smth here.

          Matt Hamilton added a comment -

          This is affecting me too. The %2f encoding of slashes is breaking something in the xcode build process. I think it is actually clang itself that is breaking. It would be great to be able to substitute the slash for an underscore or similar. Example of error message as a result of this below:

          Testing failed:
          Could not acquire lock file for module 'UIKit'
          Could not acquire lock file for module 'SwiftShims'
          Missing required module 'SwiftShims'

            • TEST FAILED **

          The following build commands failed:
          CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
          CompileSwift normal x86_64 /Users/iosbuilds/.jenkins_slave/workspace/ios-enquos-nutrition/feature%2Fjenkins2/Nutrition/Pods/CryptoSwift/CryptoSwift/Foundation/AES+Foundation.swift
          CompileSwift normal x86_64 /Users/iosbuilds/.jenkins_slave/workspace/ios-enquos-nutrition/feature%2Fjenkins2/Nutrition/Pods/CryptoSwift/CryptoSwift/AES.swift
          CompileSwift normal x86_64 /Users/iosbuilds/.jenkins_slave/workspace/ios-enquos-nutrition/feature%2Fjenkins2/Nutrition/Pods/CryptoSwift/CryptoSwift/Array+Extension.swift
          CompileSwift normal x86_64 /Users/iosbuilds/.jenkins_slave/workspace/ios-enquos-nutrition/feature%2Fjenkins2/Nutrition/Pods/CryptoSwift/CryptoSwift/Foundation/Array<UInt8>+Foundation.swift
          (5 failures)

          Matt Hamilton added a comment - This is affecting me too. The %2f encoding of slashes is breaking something in the xcode build process. I think it is actually clang itself that is breaking. It would be great to be able to substitute the slash for an underscore or similar. Example of error message as a result of this below: Testing failed: Could not acquire lock file for module 'UIKit' Could not acquire lock file for module 'SwiftShims' Missing required module 'SwiftShims' TEST FAILED ** The following build commands failed: CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler CompileSwift normal x86_64 /Users/iosbuilds/.jenkins_slave/workspace/ios-enquos-nutrition/feature%2Fjenkins2/Nutrition/Pods/CryptoSwift/CryptoSwift/Foundation/AES+Foundation.swift CompileSwift normal x86_64 /Users/iosbuilds/.jenkins_slave/workspace/ios-enquos-nutrition/feature%2Fjenkins2/Nutrition/Pods/CryptoSwift/CryptoSwift/AES.swift CompileSwift normal x86_64 /Users/iosbuilds/.jenkins_slave/workspace/ios-enquos-nutrition/feature%2Fjenkins2/Nutrition/Pods/CryptoSwift/CryptoSwift/Array+Extension.swift CompileSwift normal x86_64 /Users/iosbuilds/.jenkins_slave/workspace/ios-enquos-nutrition/feature%2Fjenkins2/Nutrition/Pods/CryptoSwift/CryptoSwift/Foundation/Array<UInt8>+Foundation.swift (5 failures)

          Dmitriy Belyaev added a comment - - edited

          Affects me to.

          Running jenkins on windows7-x64 machine an using Git Worflow (generates branches like 'release/v1.0.0' and 'feature/test') will encode slash in branch name into "%2F" which will then broke Msbuild builds cause of those encoded slash will not be resolved correctly.

          Need an option to replace symbols in branch name to something safe instead of encoding them. Something like: replace "/" with "_" or similiar as option entry (or regexp match pattern).

          Dmitriy Belyaev added a comment - - edited Affects me to. Running jenkins on windows7-x64 machine an using Git Worflow (generates branches like ' release/v1.0.0 ' and ' feature/test ') will encode slash in branch name into " %2F " which will then broke Msbuild builds cause of those encoded slash will not be resolved correctly. Need an option to replace symbols in branch name to something safe instead of encoding them. Something like: replace "/" with "_" or similiar as option entry (or regexp match pattern).

          David Aldrich added a comment -

          Also affects us. We are still using version 0.3 so that our MSBuild jobs will work.

          Can it be simply fixed by pulling: https://github.com/jenkinsci/multi-branch-project-plugin/pull/129 ?

          David Aldrich added a comment - Also affects us. We are still using version 0.3 so that our MSBuild jobs will work. Can it be simply fixed by pulling: https://github.com/jenkinsci/multi-branch-project-plugin/pull/129 ?

          Dmitriy Belyaev added a comment - - edited

          davida2009 just tried to compile my custom version of multibranch plugin with pull request you mentioned included – looks like it does not work with the latest version of sources, I suppose as developer already switched to BRANCH API making this hotfix obsolete (see comment done by mjdetullio commented on Mar 15 to pull request on Github).

          Dmitriy Belyaev added a comment - - edited davida2009 just tried to compile my custom version of multibranch plugin with pull request you mentioned included – looks like it does not work with the latest version of sources, I suppose as developer already switched to BRANCH API making this hotfix obsolete (see comment done by mjdetullio commented on Mar 15 to pull request on Github).

          David Aldrich added a comment -

          John, thanks for testing. I don't know how this issue can be moved forward. I don't have the skills to modify the plugin myself. I guess we have to wait for the developer to do it, or appeal on the mailing list for a variant of this plugin.

          David Aldrich added a comment - John, thanks for testing. I don't know how this issue can be moved forward. I don't have the skills to modify the plugin myself. I guess we have to wait for the developer to do it, or appeal on the mailing list for a variant of this plugin.

            mjdetullio Matthew DeTullio
            mjdetullio Matthew DeTullio
            Votes:
            8 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: