I'm using Jenkins with Cygpath plugin installed.
I have some scripts that is working in Cygwin bash without problems
#!/bin/bash
pwd
SCRIPTFILENAME=$(readlink -f $0)
SCRIPTPATH=`dirname $SCRIPTFILENAME`
cd $SCRIPTPATH
(python check_for_clip_duplicates.py) || exit $?
But when i'm trying to build it with Jenkins i have en error:
$ D:\cygwin\bin\cygpath -w d:\cygwin\bin\bash.exe
[default] $ D:\cygwin\bin\bash.exe -xe C:\Windows\TEMP\hudson2178008588278192726.sh
cygwin warning:
MS-DOS style path detected: C:\Windows\TEMP\hudson2178008588278192726.sh
Preferred POSIX equivalent is: /cygdrive/c/Windows/TEMP/hudson2178008588278192726.sh
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 tools/generate_all.sh pc compress reset --use-texture-packer
tools/generate_all.sh: line 2: $'\r': command not found
tools/generate_all.sh: line 3: $'pwd\r': command not found
tools/generate_all.sh: line 4: $'\r': command not found
tools/generate_all.sh: line 7: cd: /cygdrive/d/Jenkins/workspace/default/tools
: No such file or directory
C:\Python27\python.exe: can't open file 'check_for_clip_duplicates.py': [Errno 2] No such file or directory
tools/generate_all.sh: line 8: exit: 2
: numeric argument required
Build step 'Execute shell' marked build as failure
Finished: FAILURE
In Jenkins configuration in Shell executable i have: d:\cygwin\bin\bash.exe.
Main problem is that cygdrive paths does not work:
tools/generate_all.sh: line 7: cd: /cygdrive/d/Jenkins/workspace/default/tools
: No such file or directory
Any ideas?