Hi,

I have the following scenario, which does not sound so exotic:

* I'm using the CloudBees Docker Custom Build Environment Plugin (v1.2)
* a Docker container is defined and run, with a local JVM 
(see 
https://github.com/nemerosa/ontrack/blob/57471f8222a602b59b0729ae69113cb1babaa649/seed/env/Dockerfile)
* in my Jenkins job, I run a shell to run Gradle, providing the path to JVM 
in the container, using ./gradlew 
... -Dorg.gradle.java.home=/usr/lib/jvm/java-8-openjdk-amd64

However, when running the job, I still get the following error:

ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-8-oracle


This Java home is the one from the *Jenkins master*. The JAVA_HOME is set 
by the job and inherited by the job, and finally available in the 
container...

I wanted to know if you had any example of running a Gradle based job using 
the JVM you define in your Docker file.

Thanks,
Damien.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/9d899696-fe38-4bd1-b11c-e077cda23e52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to