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

durable-task 1.7 breaks workflow bat steps

    Details

    • Similar Issues:
    • Sprint:
      Pipeline - April 2018

      Description

      After updating durable-task from 1.6 to 1.7 workflow builds fail to execute bat steps:

      [Workflow] bat
      [workspace] Running batch script
      'cmd' is not recognized as an internal or external command,
      operable program or batch file.
      

      After switching back to durable-task version 1.6 everything is working again as expected

        Attachments

          Issue Links

            Activity

            Hide
            gordin Christoph Vogtländer added a comment -

            In the global Jenkins settings I have set "Prepare jobs environment" -> "Unset System Environment Variables" and I can confirm that this is causing the issue on my master node (why slave nodes are not affected remains unclear to me, the nodes have not specific setting regarding to environment variables).

            IMHO bat-steps should still work even if the "Unset System Environment Variables" option is set.

            Show
            gordin Christoph Vogtländer added a comment - In the global Jenkins settings I have set "Prepare jobs environment" -> "Unset System Environment Variables" and I can confirm that this is causing the issue on my master node (why slave nodes are not affected remains unclear to me, the nodes have not specific setting regarding to environment variables). IMHO bat-steps should still work even if the "Unset System Environment Variables" option is set.
            Hide
            hrmpw Patrick Wolf added a comment -

            Can you reproduce this on the latest version of the durable task plugin?

            Show
            hrmpw Patrick Wolf added a comment - Can you reproduce this on the latest version of the durable task plugin?
            Hide
            jglick Jesse Glick added a comment -

            Christoph Vogtländer Are you using the EnvInject plugin? If so, disable it. At any rate, if there are steps to reproduce from scratch please let us know.

            Show
            jglick Jesse Glick added a comment - Christoph Vogtländer Are you using the EnvInject plugin? If so, disable it. At any rate, if there are steps to reproduce from scratch please let us know.
            Hide
            jglick Jesse Glick added a comment -

            One user reported similar symptoms which seem to have been caused by writing

            env.PATH = "${tool 'Maven 3'}/bin:${env.PATH}"
            

            rather than

            env.Path = "${tool 'Maven 3'}\\bin;${env.Path}"
            

            (The bad path separator : is the problem; the rest is stylistic.)

            An implementation of JENKINS-28718 would offer a cross-platform version of this idiom not susceptible to that mistake.

            At any rate, WindowsBatchScript could detect a node whose current %Path% lacks C:\Windows\System32 or generally does not seem to have an entry for cmd.exe, and report this misconfiguration more clearly.

            Show
            jglick Jesse Glick added a comment - One user reported similar symptoms which seem to have been caused by writing env.PATH = "${tool 'Maven 3' }/bin:${env.PATH}" rather than env.Path = "${tool 'Maven 3' }\\bin;${env.Path}" (The bad path separator : is the problem; the rest is stylistic.) An implementation of JENKINS-28718 would offer a cross-platform version of this idiom not susceptible to that mistake. At any rate, WindowsBatchScript could detect a node whose current %Path% lacks C:\Windows\System32 or generally does not seem to have an entry for cmd.exe , and report this misconfiguration more clearly.
            Hide
            allenfisher Allen Fisher added a comment -

            I'm having the same issue that Christoph Vogtländer is having, and the workaround he suggests works for now. This is a very vanilla installation with a fresh Windows 2012 machine. Something is very strange, I am running a powershell script and I had to pass the full path to powershell.exe in order to get Jenkins to find it. The system PATH has PowerShell in it so I'm not sure why that doesn't work either.

            Show
            allenfisher Allen Fisher added a comment - I'm having the same issue that Christoph Vogtländer is having, and the workaround he suggests works for now. This is a very vanilla installation with a fresh Windows 2012 machine. Something is very strange, I am running a powershell script and I had to pass the full path to powershell.exe in order to get Jenkins to find it. The system PATH has PowerShell in it so I'm not sure why that doesn't work either.

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                gordin Christoph Vogtländer
              • Votes:
                3 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: