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

multibranch issues if branch contains /

    Details

    • 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

            Activity

            magnayn magnayn created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Labels workflow multibranch
            jglick Jesse Glick made changes -
            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.
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-30252 [ JENKINS-30252 ]
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-30595 [ JENKINS-30595 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-30798 [ JENKINS-30798 ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "PR 18 (Web Link)" [ 13506 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow PR 243 (Web Link)" [ 13507 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "literate PR 8 (Web Link)" [ 13508 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "yaml-project PR 9 (Web Link)" [ 13509 ]
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jajansen Jan Arend Jansen made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            jglick Jesse Glick made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            jajansen Jan Arend Jansen made changes -
            Link This issue is related to JENKINS-32701 [ JENKINS-32701 ]
            mscharp Michael Scharp made changes -
            Link This issue is blocking JENKINS-32902 [ JENKINS-32902 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-34564 [ JENKINS-34564 ]
            razvan_botez Razvan Botez made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            jglick Jesse Glick made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 165869 ] JNJira + In-Review [ 197835 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            git Thomas Gimpel made changes -
            Resolution Fixed [ 1 ]
            Status Resolved [ 5 ] Reopened [ 4 ]
            stephenconnolly Stephen Connolly made changes -
            Status Reopened [ 4 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            stephenconnolly Stephen Connolly made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            thois Thijs Borst made changes -
            Attachment image-2017-05-27-21-52-25-545.png [ 38153 ]
            mirceaalbu Mircea-Andrei Albu made changes -
            Link This issue is related to JENKINS-56956 [ JENKINS-56956 ]

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                magnayn magnayn
              • Votes:
                14 Vote for this issue
                Watchers:
                47 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: