Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-8821

groovy.bat doesn't work in Windows Docker nanoserver based containers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • Groovy 2.5.2 (or 2.4.3)
      Windows 2016 host with microsoft/nanoserver based Docker container

    Description

      groovy.bat relies on c:\windows\system32\find.exe, which is notably absent in Microsoft containers.  There is some logic to avoid clashing with cygwin's version of find.exe (which I do have), but it doesn't cover the case of the correct find.exe missing altogether.

      When running Jenkins, this is what I see:

      Unpacking 
       https://dl.bintray.com/groovy/maven/apache-groovy-binary-2.5.2.zip
       to c:\jenkinswork\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_Latest on docker-003fbd390qkb2 on Windows 01
       [00b97b92] $ c:\jenkinswork\tools\hudson.plugins.groovy.GroovyInstallation\Groovy_Latest\bin\groovy.bat c:\jenkinswork\workspace\infra\test-docker-windows-temp\00b97b92\hudson7647040981337869977.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.9
       Please set the JAVA_HOME variable in your environment
      

      As you can see, the error message is rather misleading. 

      The real issue is that groovy.bat winds up using cygwin's find.exe that has an entirely different purpose.

      Attachments

        Activity

          People

            Unassigned Unassigned
            akomakom Akom
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: