Skip to content
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

Modernization for JDK21 and JDK21 tests #54

Merged
merged 8 commits into from
Jan 3, 2024
Merged

Conversation

gounthar
Copy link
Contributor

@gounthar gounthar commented Oct 2, 2023

Test with Java 21

Java 21 was released Sep 19, 2023. We want to announce full support for Java 21 in early October and would like the most used plugins to be compiled and tested with Java 21.

The acceptance test harness and plugin bill of materials tests are already passing with Java 21. This is a further step to improve plugin readiness for use with Java 21 and for development with Java 21.

The change intentionally tests only two Java configurations, Java 17 and Java 21 because we believe that the risk of a regression that only affects Java 11 is shallow. We generate Java 11 byte code with the Java 17 and the Java 21 builds, so we're already testing Java 11 byte code.

Testing done

I had to update the parent POM to get it to work with JDK21.
As soon as I did that, I had to change the Jenkins version, or it wouldn't compile.
Then I also changed the BOM version to be the same as the Jenkins version (as described in the "Improve a plugin tutorial").

Confirmed tests pass with Java 21.

…ion.

As soon as I updated the parent POM, I got an error message stating I had to move to Jenkins version 2.361.x.
@gounthar
Copy link
Contributor Author

gounthar commented Oct 2, 2023

We're still using JDK8, and that's why the build is failing.
Could someone please re-run it with our proposed Jenkinsfile?
Thanks.

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to drop the outdated version 2.342 from the Jenkinsfile

Jenkinsfile Outdated Show resolved Hide resolved
@MarkEWaite
Copy link
Contributor

@rsandell, @car-roll, or @dwnusbaum could you merge this so that the plugin is regularly tested with Java 21 and Java 17?

Copy link
Contributor

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two optional changes for your consideration. Approved whether or not those changes are included.

pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
Jenkinsfile Outdated Show resolved Hide resolved
@gounthar gounthar requested a review from a team as a code owner January 3, 2024 14:42
@jtnord jtnord enabled auto-merge January 3, 2024 14:45
@jtnord jtnord merged commit 94cb23b into jenkinsci:master Jan 3, 2024
14 checks passed
@MarkEWaite
Copy link
Contributor

Thanks @jtnord !

@gounthar gounthar deleted the jdk21 branch January 3, 2024 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants