See to work all you need to provide bash path in global settings of jenkins as /bin/bash ..try out this... On Dec 2, 2014 9:20 PM, "Rupali" <[email protected]> wrote:
> 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 a topic in the > Google Groups "Jenkins Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-users/g0s4kSGQn2I/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/08c6d591-fb2c-4303-8474-bbdef892d3a0%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/08c6d591-fb2c-4303-8474-bbdef892d3a0%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CALpWO%2BBe5Pyw7251WdRj7b3L-BLhbUbW5p8ZUqg9YURhcBC-qA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
