To debug further, I modified BourneShellScript.java file in DurableTask 
plugin to print the environment variables with which it is calling the 
script.
I found that environment variables do not contain path to Cygwin as 
observed in the output. 

Can this be reason for the error I am seeing?
If yes, how to fix that? I have path to Cygwin setup on master and slave 
nodes thorugh which initial execution gets triggered.

Any inputs on this will be highly appreciated.

Regards,
Rupali
On Tuesday, December 2, 2014 6:25:57 PM UTC+5:30, Rupali wrote:
>
> Hi,
>
> I tried number of options but this is not working.
> Does Shell script in workflow steps works only on Linux/Unix slaves?
>
> Regards,
> Rupali
>
> On Monday, December 1, 2014 5:38:50 PM UTC+5:30, Rupali wrote:
>>
>> HI Ninad,
>>
>> Thank for the reply. But it doesn't work.
>> Thing is, shell execution works well as part of normal Jenkins job, as a 
>> build step.
>> But it fails to work when I add it as workflow step.
>> Not sure if workflow plugin has a different way to invoke shell scripts 
>> than traditional Jenkins shell script execution.
>>
>> Regards,
>> Rupali
>>
>> On Friday, November 28, 2014 3:09:05 PM UTC+5:30, Rupali wrote:
>>>
>>> Hi,
>>>
>>> I tried a simple command in shell script as below:
>>> sh 'echo Hello'
>>>
>>> It gives below error:
>>>
>>> [D:\Jenkins-Slave\workspace\Setup-WF] Running shell script
>>> cygwin warning:
>>>   MS-DOS style path detected: 
>>> D:\Jenkins-Slave\workspace\Setup-WF\.fb8e6a28\pid
>>>   Preferred POSIX equivalent is: 
>>> /cygdrive/d/Jenkins-Slave/workspace/Setup-WF/.fb8e6a28/pid
>>>   CYGWIN environment variable option "nodosfilewarning" turns off this 
>>> warning.
>>>   Consult the user's guide for more details about POSIX paths:
>>>     http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
>>> sh: D:\Jenkins-Slave\workspace\Setup-WF\.fb8e6a28\script.sh: command not 
>>> found
>>>
>>> Can you please advise what could be wrong here?
>>>
>>> Regards,
>>> Rupali
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/08c6d591-fb2c-4303-8474-bbdef892d3a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to