-
Bug
-
Resolution: Fixed
-
Minor
-
Jenkins 1.580.1
I noticed that when there is no installer available for a JDK, the JAVA_HOME environment variable will be empty in the environment of a build. This will happen for example when there is no installer configured for a JDK. In that case it's not hard to find the cause. But for the case I describe below it's much harder to find out why JAVA_HOME is empty.
Therefore I think logging should be improved when a specific JDK is configured for that build and no installer is available for that JDK. Furthermore JAVA_HOME should be set to match the default JVM.
Here are the steps to reproduce:
- Configure two JDK's, named JDK1 and JDK2 (because if you have only one JDK you can't select one in a job)
- Add an 'Extract .zip/.tar.gz' installer to JDK1 and set the label for this installer to 'jdk1', so it won't be available for installation on nodes to which this label is not assigned
- Create a freestyle job and select JDK1 as JDK
- Run the job and check that JAVA_HOME is empty
- links to
[JENKINS-26940] No feedback why no installer was found for a given node
Issue Type | Original: Bug [ 1 ] | New: Improvement [ 4 ] |
Description |
Original:
I noticed that when there is no installer available for a JDK, the JAVA_HOME environment variable will be empty in the environment of a build. This will happen for example when there is no installer configured for a JDK. In that case it's not hard to find the cause. But for the case I describe below it's much harder to find out why JAVA_HOME is empty. Therefore I think a build should fail or JAVA_HOME should not be set when a specific JDK is configured for that build and no installer is available for that JDK. Here are the steps to reproduce: - Configure two JDK's, named JDK1 and JDK2 (because if you have only one JDK you can't select one in a job) - Add an 'Extract *.zip/*.tar.gz' installer to JDK1 and set the label for this installer to 'jdk1', so it won't be available for installation on nodes to which this label is not assigned - Create a freestyle job and select JDK1 as JDK - Run the job and check that JAVA_HOME is empty |
New:
I noticed that when there is no installer available for a JDK, the JAVA_HOME environment variable will be empty in the environment of a build. This will happen for example when there is no installer configured for a JDK. In that case it's not hard to find the cause. But for the case I describe below it's much harder to find out why JAVA_HOME is empty. Therefore I think logging should be improved when a specific JDK is configured for that build and no installer is available for that JDK. Furthermore JAVA_HOME should be set to match the default JVM. Here are the steps to reproduce: - Configure two JDK's, named JDK1 and JDK2 (because if you have only one JDK you can't select one in a job) - Add an 'Extract *.zip/*.tar.gz' installer to JDK1 and set the label for this installer to 'jdk1', so it won't be available for installation on nodes to which this label is not assigned - Create a freestyle job and select JDK1 as JDK - Run the job and check that JAVA_HOME is empty |
Assignee | New: Daniel Beck [ danielbeck ] |
Resolution | New: Duplicate [ 3 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Workflow | Original: JNJira [ 161124 ] | New: JNJira + In-Review [ 196648 ] |
Resolution | Original: Duplicate [ 3 ] | |
Status | Original: Resolved [ 5 ] | New: Reopened [ 4 ] |
Status | Original: Reopened [ 4 ] | New: Open [ 1 ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Remote Link | New: This issue links to "PR 2598 (Web Link)" [ 14970 ] |