0
votes

I have a remote Windows computer with Cygwin 1.7.35 installed on it and we use it as a slave for CI testing with Jenkins.

I created a Jenkins job to build a Maven project (after cloning from repository).

The Jenkins contains Cygpath 1.5 plugin and the registry path to Cygwin is SOFTWARE/Cygwin/Setup

I use a PreStep to clone the project from a repository:

source ~/.profile > /dev/null
cd /cygdrive/c
rm -rf .$WORKSPACE/project-name
hg clone something something

The repository clone works fine. The build fails and I get this error in the console output:

ERROR: Failed to parse POMs
    hudson.util.IOException2: Failed to locate Cygwin installation. Is Cygwin installed?    
    at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.getCygwinRoot(CygpathLauncherDecorator.java:138)
    etc...

I tried rewriting the Path variable from C:\cygwin64\bin to C:/cygwin64/bin and back. I tried this on Cygwin 1.7.32 first and then on 1.7.35 again. I tried changing the path in the registry entry from C:\Cygwin64 to C:Cygwin64\bin and back. Nothing works.

My colleague builds his project on the same Jenkins server with the same slave, but he is using an Ant project with build.xml and it works just fine.

Please, do you have any suggestions on how to solve this?

Thanks!

Peter

2

2 Answers

0
votes

I found an answer.

I created a new registry entry under

SOFTWARE\Cygnus Solutions\Cygwin\ string rootdir aiming to cygwin64.

Which is strange, because in my Jenkins I use cygpath 1.5 which should find the correct path of Cygwin installation which is under registry path SOFTWARE\Cygwin\setup.

I also had to change the Jenkins slave machine configuration, because the slave machine Java SDK version is different than Java SDK version in global Jenkins settings.

I hope that someone finds this helpful! Peter

0
votes

I looked in the source code of the file which threw the exception and found out that it wants a string from the key

'HKLM/SOFTWARE/Wow6432Node/Cygwin/setup'

named 'rootdir' which has the absolute path to your Cygwin installation.

Edit: I ended up creating the key 'setup' because it didn't exist.