-
Notifications
You must be signed in to change notification settings - Fork 36
Require Java 11 and Jenkins 2.387.3 or newer, test with Java 21 #46
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
Require Java 11 and Jenkins 2.387.3 or newer, test with Java 21 #46
Conversation
Bumps [org.jenkins-ci.plugins:plugin](https://github.com/jenkinsci/plugin-pom) from 4.33 to 4.74. - [Release notes](https://github.com/jenkinsci/plugin-pom/releases) - [Changelog](https://github.com/jenkinsci/plugin-pom/blob/master/CHANGELOG.md) - [Commits](jenkinsci/plugin-pom@plugin-4.33...plugin-4.74) --- updated-dependencies: - dependency-name: org.jenkins-ci.plugins:plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…ci.plugins-plugin-4.74
Rely on Java byte code generation for Java 11 support
Better to configure forkCount in the local profile of the machine and include a forkCount setting in the Jenkinsfile for CI.
…gelist-maven-extension-1.7' into test-with-java-21
useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests | ||
configurations: [ | ||
[platform: 'linux', jdk: 21], | ||
[platform: 'windows', jdk: 17], |
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.
Can we have more configurations? I'd love to test it on Linux-JDK8 and Linux-JDK11, if possible.
Why? The OpenClover (org.openclover:clover) officially supports JDK7-9 only. In its latest 4.5.0 release an experimental support for JDK10-17 was added.
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.
Yes, you're welcome to test more configurations, though testing Java 8 won't work with this pull request because Jenkins 2.361.1 and later do not support Java 8. Jenkins 2.361.1 and later use Java 11 byte code and support only Java 11 and Java 17.
Agents can still run builds with Java 8, but the controller itself must run with Java 11 or Java 17. The agents also must run with Java 11 or Java 17 but they can control jobs that run any any JDK version or any other tool version.
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 didn't include a test of Java 11 in this case because the Java 17 compiler is configured by the Jenkins build tools to generate Java 11 byte code. Likewise for the Java 21 compiler. They are both generating and executing Java 11 byte code, so it did not seem especially useful to create a Java 11 test configuration to generate Java 11 byte code again.
I was intentionally accepting the risk of not running tests directly on Java 11 because the Jenkins project will end its support of Java 11 in Oct 2024 when Eclipse Temurin and other Java providers are expected to end their public support of Java 11. We're only 12 months away from needing to remove that test configuration and the test configuration is already reasonably covered by the Java 17 and Java 21 configurations.
If you feel strongly that you want an explicit Java 11 configuration, I'm willing to add it. I think it is testing things that are already well tested by other configurations, but I am less attached to reducing test configurations than I am to testing Java 21 in more plugins.
Let me know your preference. Thanks again for reviewing the pull request and merging the other pull requests!
@@ -34,16 +34,15 @@ | |||
<changelist>-SNAPSHOT</changelist> | |||
<gitHubRepo>jenkinsci/clover-plugin</gitHubRepo> | |||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | |||
<java.level>8</java.level> | |||
<jenkins.version>2.289.3</jenkins.version> | |||
<jenkins.version>2.387.3</jenkins.version> |
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.
Can you add
##Unreleased
* Minimum Jenkins version required is 2.387.3 now
in the CHANGELOG.md?
FYI: I'm about to release new Jenkins Clover Plugin version (4.14.0) soon.
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.
Happy to do that. Have you considered switching to release drafter so that the changelog is maintained automatically? Instructions are available with more details.
Added in 7b31e02
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 also changed the title of the pull request so that the release drafter will include the "Require Java 11 and Jenkins 2.387.3 or newer" in the changelog that it generates.
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.
Thank you, yes I'm working on automation and release drafter, but this is not active yet.
Since you've enabled continuous delivery, I believe that you'll need to label pull requests like this one so that the continuous delivery tools can decide if a pull request justifies a new release. I recommend labeling this change as an "enhancement" since it is changing the Jenkins minimum version |
Would you like me to rebase this pull request so that the merge history is not cluttered? That will cause some of the puill requests discussions to be hidden on this page but will make the git history much more tidy. I'm fine either way. You're also welcome to squash merge this if you prefer. |
Require Java 11 and Jenkins 2.387.3 or newer, test with Java 21
Java 21 released Sep 19, 2023. We'd like to announce full support for Java 21 in early October and would like the most used plugins to be compiling and testing 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.
Pull request supersedes the following pull requests:
Move the definition of parallel testing from the Maven pom file into the Jenkinsfile so that ci.jenkins.io continues to run the tests with one process per available core, while developers are allowed to configure the amount of parallel testing based on the configuration and use of their computer.
Developers can adjust parallel execution by passing a command line argument to Maven like this:
Developers can define a Maven profile that sets the forkCount in their ~/.m2/settings.xml like this:
Testing done
Confirmed tests pass with Java 21 on Linux.
Submitter checklist