-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
Windows build agent using DCOM method, Java 1.7/1.8, Jenkins 2.32.3
I started to convert a Freestyle job to a declarative Pipeline job today, and found that most of the time it was failing with the following error: 'cmd' is not recognized as an internal or external command, operable program or batch file.
After some investigation I realized that several of my build agents have the PATH variable overridden in the node configuration, i.e.
PATH=${PATH};c:\some\additional\path
With a Freestyle job,
${PATH}
is expanded correctly, but with the Pipeline job it appears not to be; adding an echo env.PATH prior to my bat step echoes an unexpanded path. It doesn't look like there's another way to get at the run environment like w/ a freestyle job, so I am not sure how else to check for sure that this is what is happening, but it seems likely.
I see the same behavior if I try PATH=%PATH%;.., which doesn't work on Freestyle jobs either, so I know that's not the problem..
If we clear the PATH override in the build agent node properties, it works fine. We're looking at whether we really need to do this override on all our build agents, but this should work just like it does with a freestyle job.
Versions of durable-task and workflow-durable-task-step not specified here so who knows.