-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Use JDK 21 as default JDK instead of JDK 17 #2008
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use JDK 21 as default JDK instead of JDK 17 #2008
Conversation
Testing done: Before the change (using images downloaded from hub.docker.com): These images change in the "before" and "after" comparison: $ for label in 2.479 2.479-alpine 2.479-slim; do docker run -q jenkins/jenkins:$label java -version; done openjdk version "17.0.12" 2024-07-16 OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7) OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode) These images do not change in the "before" and "after" comparison: $ for label in 2.479-alpine-jdk21 2.479-jdk21 2.479-rhel-ubi9-jdk21 2.479-slim-jdk21; do docker run -q jenkins/jenkins:$label java -version; done openjdk version "21.0.4" 2024-07-16 LTS OpenJDK Runtime Environment Temurin-21.0.4+7 (build 21.0.4+7-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.4+7 (build 21.0.4+7-LTS, mixed mode) These images do not change in the "before" and "after" comparison: $ for label in 2.479-alpine-jdk17 2.479-jdk17 2.479-rhel-ubi9-jdk17 2.479-slim-jdk17; do docker run -q jenkins/jenkins:$label java -version; done openjdk version "17.0.12" 2024-07-16 OpenJDK Runtime Environment Temurin-17.0.12+7 (build 17.0.12+7) OpenJDK 64-Bit Server VM Temurin-17.0.12+7 (build 17.0.12+7, mixed mode) After the change: These images change in the "before" and "after" comparison: $ for label in 2.479 2.479-alpine 2.479-slim; do docker run -q jenkins/jenkins:$label java -version; done openjdk version "21.0.6" 2025-01-21 LTS OpenJDK Runtime Environment Temurin-21.0.6+7 (build 21.0.6+7-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.6+7 (build 21.0.6+7-LTS, mixed mode) These images do not change in the "before" and "after" comparison: $ for label in 2.479-alpine-jdk21 2.479-jdk21 2.479-rhel-ubi9-jdk21 2.479-slim-jdk21; do docker run -q jenkins/jenkins:$label java -version; done openjdk version "21.0.6" 2025-01-21 LTS OpenJDK Runtime Environment Temurin-21.0.6+7 (build 21.0.6+7-LTS) OpenJDK 64-Bit Server VM Temurin-21.0.6+7 (build 21.0.6+7-LTS, mixed mode) These images do not change in the "before" and "after" comparison: $ for label in 2.479-alpine-jdk17 2.479-jdk17 2.479-rhel-ubi9-jdk17 2.479-slim-jdk17; do docker run -q jenkins/jenkins:$label java -version; done openjdk version "17.0.14" 2025-01-21 OpenJDK Runtime Environment Temurin-17.0.14+7 (build 17.0.14+7) OpenJDK 64-Bit Server VM Temurin-17.0.14+7 (build 17.0.14+7, mixed mode)
Only tag those specifically identified as JDK 17 JDK 21 build will be used for tags without JDK version
|
I am reasonably confident that the Linux changes are correct. I am absolutely not confident that the Windows changes are correct. Would love to have review from others to guide me on the Windows implementation. |
timja
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its right, looks like Windows wasn't setting which one was the default and it was just a race from what I'm reading?
That was my interpretation, but I'd really like a review from @lemeurherve or @lemeurherveCB or @dduportal in case I've misunderstood the build process for Windows container images. |
|
Too bad there isn't (yet?) the same mechanism as in docker-agent, that would have been easier: https://github.com/jenkinsci/docker-agent/blob/ce8fc915c8b6a3787f487377e62fa22262c92017/docker-bake.hcl#L51-L53 I need some time to review it, will try taking a look this week. |
|
I think that we need this merged before the weekly release on Tuesday. @lemeurherveCB or @dduportal could you review and merge it on Tuesday before the weekly release is packaged? |
dduportal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
|
Err I don't remember that happening, docker-agent repo seems to be working fine: I think we just never ported the GitHub action here as we were trialing it on docker agent first |
Update all examples to use jenkins/jenkins:lts-jdk21 instead of lts-jdk17 to reflect the current recommended Jenkins Docker image. Fixes jenkinsci#2008
Update all examples to use jenkins/jenkins:lts-jdk21 instead of lts-jdk17 to reflect the current recommended Jenkins Docker image. Fixes #2008


Use JDK 21 as default JDK instead of JDK 17
The Java 17 end of life warning message is now displayed to Jenkins users running the containers that do not specify a JDK version in their label. This changes from Java 17 to Java 21 for those containers that don't include the JDK version number in the label.
Weekly containers that will be built with Java 21 include:
LTS containers that will be built with Java 21 include:
Testing done:
Tested the Linux container images and their labels. Did not test the Windows container images and their labels. Will rely on ci.jenkins.io to run the Windows tests.
Before the change (using images downloaded from hub.docker.com):
These images change in the "before" and "after" comparison:
These images do not change in the "before" and "after" comparison:
These images do not change in the "before" and "after" comparison:
After the change (using locally built images):
These images change in the "before" and "after" comparison:
These images do not change in the "before" and "after" comparison:
These images do not change in the "before" and "after" comparison:
Submitter checklist