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

Slashes in branch names cause 'bat' workflow task to hang

    XMLWordPrintable

Details

    Description

      As first reported in JENKINS-30744 windows 'bat' workflow task hangs on the encoding of git branch names when these branches contain special characters (tested with gitflow naming convention that has '/' in the branch name).

      The encoded path seems to create problems on windows when using 'bat'.
      Any branch that has a slash in it for example ('feature/myfeature') will get an encoded path on windows like <workspace_path>/feature%2Fmyfeature@script and <workspace_path>/feature%2Fmyfeature.
      When I apply the following workflow in a multibranch job in a root file 'Jenkinsfile', Jenkins hangs forever on the bat command

      node {
          stage 'Checkout'
          checkout scm
          stage 'Build'
          bat "echo 'test'"
      }
      

      When I add this same script on the 'master' branch everything is fine.

      Attachments

        Issue Links

          Activity

            saucistophe Christophe Carpentier added a comment - andne see JENKINS-33456 .
            jglick Jesse Glick added a comment -

            Not clear why this was reopened. Newly mentioned problem seems unrelated.

            jglick Jesse Glick added a comment - Not clear why this was reopened. Newly mentioned problem seems unrelated.
            nitram Martin Karing added a comment -

            The bug that is causing the batch execution to hang is described in JENKINS-34150. How ever this is unrelated to the escaping issue that was the cause of this bug.

            nitram Martin Karing added a comment - The bug that is causing the batch execution to hang is described in JENKINS-34150 . How ever this is unrelated to the escaping issue that was the cause of this bug.
            bokc bokc added a comment -

            I have the same problem :

            • Jenkins 2.68
            • Durable task Plugin : 1.14
            bokc bokc added a comment - I have the same problem : Jenkins 2.68 Durable task Plugin : 1.14
            jglick Jesse Glick added a comment -

            bokc there is a tested fix for at least some such scenario. If you continue to have problems, please file a separate issue linked to this one with complete steps to reproduce from scratch, as there may be some specialized scenario not covered by the original fix.

            jglick Jesse Glick added a comment - bokc there is a tested fix for at least some such scenario. If you continue to have problems, please file a separate issue linked to this one with complete steps to reproduce from scratch, as there may be some specialized scenario not covered by the original fix.

            People

              jglick Jesse Glick
              jajansen Jan Arend Jansen
              Votes:
              5 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: