[JIRA] (JENKINS-41998) 'bat' step fails if configured agent overrides system path

2017-03-28 Thread andrew.ba...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Andrew Bayer updated an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41998  
 
 
  'bat' step fails if configured agent overrides system path   
 

  
 
 
 
 

 
Change By: 
 Andrew Bayer  
 
 
Component/s: 
 workflow-durable-task-step-plugin  
 
 
Component/s: 
 pipeline  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-41998) 'bat' step fails if configured agent overrides system path

2017-02-13 Thread will.sa...@greenwayhealth.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Will Saxon created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Jenkins /  JENKINS-41998  
 
 
  'bat' step fails if configured agent overrides system path   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Attachments: 
 nodeproperties.PNG, result.PNG, snippet.PNG  
 
 
Components: 
 pipeline  
 
 
Created: 
 2017/Feb/13 11:39 PM  
 
 
Environment: 
 Windows build agent using DCOM method, Java 1.7/1.8, Jenkins 2.32.3  
 
 
Priority: 
  Minor  
 
 
Reporter: 
 Will Saxon  
 

  
 
 
 
 

 
 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.