Skip to content

Commit

Permalink
JENKINS-69581: Install java-11-openjdk
Browse files Browse the repository at this point in the history
If Jenkins recieves a non-zero error code when runing `java
-fullversion` on the remote agent then it will install java 11 using
yum.

Previously this installed java 8 which is no longer supported on Jenkins agents
where the controller is running version 2.361.x or higher
  • Loading branch information
Geordie Rogers committed Sep 19, 2022
1 parent bce0116 commit aa42596
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/hudson/plugins/ec2/ssh/EC2UnixLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ protected void launchScript(EC2Computer computer, TaskListener listener) throws

// TODO: parse the version number. maven-enforcer-plugin might help
final String javaPath = node.javaPath;
executeRemote(computer, conn, javaPath + " -fullversion", "sudo yum install -y java-1.8.0-openjdk.x86_64", logger, listener);
executeRemote(computer, conn, javaPath + " -fullversion", "sudo yum install -y java-11-openjdk", logger, listener);
executeRemote(computer, conn, "which scp", "sudo yum install -y openssh-clients", logger, listener);

// Always copy so we get the most recent remoting.jar
Expand Down

0 comments on commit aa42596

Please sign in to comment.