-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
-
Jenkins 2.144
Groovy plugin 2.0
Docker plugin 1.1.5
Windows 2016 with Docker 17.06.2-ee-16
[fbce260c] $ c:\jenkinswork\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_2.4.3\groovy-2.4.3\bin\groovy.bat c:\jenkinswork\workspace\infra\test-jdk-installs-docker\fbce260c\hudson6050613090235584392.groovy find: '/I': No such file or directory find: '/C': No such file or directory ERROR: JAVA_HOME is set to an invalid directory: c:\jenkins\jdk\JDK_1.6 Please set the JAVA_HOME variable in your environment to match the location of your Java installation.
In fact, JAVA_HOME is set correctly (in my case), and other steps (eg maven) work fine.
The problem is that the batch script that invokes groovy uses "c:\windows\system32\find.exe", which is not part of the microsoft/nanoserver docker image that is fairly standard.
Once I manually added the host's copy of find.exe, groovy step worked. Also, my custom docker image has cygwin, which means that due to the absence of the microsoft find.exe, it's invoking cygwin's.