-
New Feature
-
Resolution: Fixed
-
Minor
-
None
On the Jenkins Public Infrastructure, we would like to explicitly specify the java binary used to spawn the agent process.
The rationale is the following:
- A good practise is to use the same JDK on both agent and controllers
- The AMI that we are using have multiple JDKs installed (8,11, 17): we defined the 11 as default which maps to the controller ci.jenkins.io for today. But in the near future, we'll have to upgrade the controller's JDK to JDK17 while keeping JDK11 as a default.
- The plugins for Kubernetes agents, Azure VM agents, Azure Container instances, and also the permenant agents (both SSH and inbound) all have a field "Agent Java Path" to specify the "java" command.
- The EC2 plugin already specifies a "Agent JVM Options" field used for the agent process command
(Edit: adding system informations)
- Jenkins Core LTS 2.346.3
- EC plugin 1.68
A bit more context: https://github.com/jenkins-infra/helpdesk/issues/3090 for the initial need.
Also, it looks like that this request is related to https://github.com/jenkinsci/ec2-plugin/blob/da65b27d65164b3d8f43ce45f99ed73e5d85009b/src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java#L250 (for the unix launcher) where the "java" string is used raw to specify the binary, relying on the PATH.