Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-22149

cygpath plugin should not fail on windows when cygwin is not installed

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • cygpath-plugin
    • None

      We have a landscape, where only a subset of our windows jenkins slaves have cygwin installed.
      On the slaves without cygwin, the jenkins cygpath plugin gets an error. Note that also happens on steps, that are not related to cygwin, as can be seend in the error appended at the end - in that case invocation of a maven task.

      Suggestion is NOT to fail, and simply do nothing, passing the commands thru without any modifications.

      Will attach a patch that provides a solution.

      FATAL: command execution failed
      hudson.util.IOException2: Failed to locate Cygwin installation. Is Cygwin installed?
      at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.getCygwinRoot(CygpathLauncherDecorator.java:138)
      at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.call(CygpathLauncherDecorator.java:142)
      at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.call(CygpathLauncherDecorator.java:112)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:61)
      at java.lang.Thread.run(Unknown Source)
      Caused by: hudson.util.jna.JnaException: Win32 error: 2 - null
      at hudson.util.jna.RegistryKey.check(RegistryKey.java:124)
      at hudson.util.jna.RegistryKey.open(RegistryKey.java:223)
      at hudson.util.jna.RegistryKey.openReadonly(RegistryKey.java:218)
      at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.getCygwinRoot(CygpathLauncherDecorator.java:127)
      ... 11 more
      Build step 'Invoke top-level Maven targets' marked build as failure ... 11 more

            Unassigned Unassigned
            gerhard6 gerhard6
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: