-
Bug
-
Resolution: Unresolved
-
Minor
-
None
A '%' character in a branch name breaks the GitHub API calls on a git repository if the job performing the clone is generated by GitHub Organization Folder plugin (windows or Linux) or the GitHub branch source (windows or Linux).
Steps to duplicate the problem:
- Define a GitHub multibranch PIpeline job referencing the MarkEWaite/jenkins-bugs repository (or a GitHub Organization Folders job which references the GitHub organization MarkEWaite, looking only at the repository jenkins-bugs)
- Scan the repository, watch the jobs run
- Open the has-percent-%-JENKINS-44360 job and confirm it failed to clone
Steps to show the same branch working with a multibranch pipeline:
- Define a multi-branch pipeline job using the MarkEWaite/jenkins-bugs github repo using Git as the branch source rather than GitHub
- Scan the repository, watch the jobs run
- Open the has-percent-%-JENKINS-44360 job and confirm it cloned successfully
The issue seems to require:
- GitHub Organization Folders or GitHub multibranch
- '%' in the branch name on the repository
- blocks
-
JENKINS-34564 Give the ability to choose how the multibranch subprojects will be named.
-
- Resolved
-
- duplicates
-
JENKINS-2111 removing a job (including multibranch/org folder branches/repos) does not remove the workspace
-
- Resolved
-
- relates to
-
JENKINS-54654 A recent update breaks builds by escaping slashes to percent signs in workspace paths
-
- Resolved
-
[JENKINS-44360] '%' in branch name causes GitHub multi-branch job failures
Summary | Original: '%' in branch name of GitHub Organization Folders causes strange job Windows failure | New: '%' in branch name of GitHub Organization Folders repository causes job failure |
Description |
Original:
A '%' character in a branch name breaks clone on a git repository if the job performing the clone is generated by GitHub Organization Folder plugin. The same character in the same branch does not break clone with a multi-branch pipeline automatically defined job. Steps to duplicate the problem: # Define a GitHub Organization Folders job which references the GitHub organization MarkEWaite, looking only at the repository jenkins-bugs # Scan the repository, watch the jobs run # Open the has-percent-%- Steps to show the same branch working with a multibranch pipeline: # Define a multi-branch pipeline job using the MarkEWaite/jenkins-bugs github repo # Scan the repository, watch the jobs run # Open the has-percent-%- The issue seems to require: * GitHub Organization Folders * '%' in the branch name on the repository |
New:
A '%' character in a branch name breaks clone on a git repository if the job performing the clone is generated by GitHub Organization Folder plugin. The same character in the same branch does not break clone with a multi-branch pipeline automatically defined job. Steps to duplicate the problem: # Define a GitHub Organization Folders job which references the GitHub organization MarkEWaite, looking only at the repository jenkins-bugs # Scan the repository, watch the jobs run # Open the has-percent-%-JENKINS-44360 job and confirm it failed to clone Steps to show the same branch working with a multibranch pipeline: # Define a multi-branch pipeline job using the MarkEWaite/jenkins-bugs github repo # Scan the repository, watch the jobs run # Open the has-percent-%-JENKINS-44360 job and confirm it cloned successfully The issue seems to require: * GitHub Organization Folders * '%' in the branch name on the repository |
Summary | Original: '%' in branch name of GitHub Organization Folders repository causes job failure | New: '%' in branch name causes Windows multi-branch job failures |
Component/s | New: workflow-multibranch-plugin [ 21465 ] |
In my experience earlier today, this happens with a Multibranch Pipeline pointed at a GitHub repository; it does not require a GitHub Organization Folders job. I had an established Multibranch Pipeline job (which had built master) and when I added a branch called "percents are 100% good", the new branch build in Jenkins failed with a java.io.FileNotFoundException (and dumped a large chunk of HTML to the console log). It looks like GitHub expects the "%" to be escaped as %25 when cloning the remote repository, and it wasn't.
I should add that this was on a Windows Jenkins node, and was pointed at GitHub Enterprise, in case either is a relevant detail.