Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Component/s: pipeline
-
Labels:
-
Similar Issues:
Description
Our repository contains a variant of the git-flow branch naming convention, where you will see
branches such as dev/main or release/3.2
Using multibranch, strange things happen:
- dev/main gets displayed as dev%2Fmain, then on restart dev%252Fmain, then dev%25252Fmain and all history seems to be lost.
This is likely down to / being a dodgy delimiter for a project name. I tried to fix this by adjusting WorkflowBranchProjectFactory thusly:
- WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branch.getName()); + String branchName = branch.getName().replace("/", "-"); + WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branchName);
but it didn't seem to help.
Happy to try to fix if I can get a pointer as to what to look at.
Attachments
Issue Links
- depends on
-
JENKINS-30252 Provide easy access to git branch name in multibranch workflow scripts
-
- Resolved
-
-
JENKINS-30595 Obtain SCMHead from Item
-
- Resolved
-
- is blocking
-
JENKINS-32902 Multibranch pipeline has issues with / in jobName
-
- Resolved
-
- is duplicated by
-
JENKINS-34564 Give the ability to choose how the multibranch subprojects will be named.
-
- Resolved
-
- is related to
-
JENKINS-30798 Workflow multibranch failed after rebase: IllegalStateException: could not find branch tip
-
- Resolved
-
-
JENKINS-32701 Slashes in branch names cause 'bat' workflow task to hang
-
- Resolved
-
-
JENKINS-56956 Open Blue Ocean link with / character in branch name redirects to 404
-
- Closed
-
- links to
Activity
Field | Original Value | New Value |
---|---|---|
Labels | workflow | multibranch |
Description |
Our repository contains a variant of the git-flow branch naming convention, where you will see branches such as dev/main or release/3.2 Using multibranch, strange things happen: - dev/main gets displayed as dev%2Fmain, then on restart dev%252Fmain, then dev%25252Fmain and all history seems to be lost. This is likely down to / being a dodgy delimiter for a project name. I tried to fix this by adjusting WorkflowBranchProjectFactory thusly: - WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branch.getName()); + + String branchName = branch.getName().replace("/", "-"); + + WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branchName); but it didn't seem to help. Happy to try to fix if I can get a pointer as to what to look at. |
Our repository contains a variant of the git-flow branch naming convention, where you will see branches such as {{dev/main}} or {{release/3.2}} Using multibranch, strange things happen: - {{dev/main}} gets displayed as {{dev%2Fmain}}, then on restart {{dev%252Fmain}}, then {{dev%25252Fmain}} and all history seems to be lost. This is likely down to {{/}} being a dodgy delimiter for a project name. I tried to fix this by adjusting {{WorkflowBranchProjectFactory}} thusly: {code} - WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branch.getName()); + String branchName = branch.getName().replace("/", "-"); + WorkflowJob job = new WorkflowJob((WorkflowMultiBranchProject) getOwner(), branchName); {code} but it didn't seem to help. Happy to try to fix if I can get a pointer as to what to look at. |
Link |
This issue depends on |
Link |
This issue depends on |
Link |
This issue is related to |
Status | Open [ 1 ] | In Progress [ 3 ] |
Remote Link | This issue links to "PR 18 (Web Link)" [ 13506 ] |
Remote Link | This issue links to "workflow PR 243 (Web Link)" [ 13507 ] |
Remote Link | This issue links to "literate PR 8 (Web Link)" [ 13508 ] |
Remote Link | This issue links to "yaml-project PR 9 (Web Link)" [ 13509 ] |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Link |
This issue is related to |
Link |
This issue is blocking |
Link |
This issue is duplicated by |
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Workflow | JNJira [ 165869 ] | JNJira + In-Review [ 197835 ] |
Component/s | pipeline-general [ 21692 ] |
Component/s | workflow-plugin [ 18820 ] |
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Resolution | Fixed [ 1 ] | |
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Status | Resolved [ 5 ] | Closed [ 6 ] |
Attachment | image-2017-05-27-21-52-25-545.png [ 38153 ] |
Link |
This issue is related to |