Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/A-test-master.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: A quick test on JDK8
name: A Test master on JDK 17

on:
push:
Expand All @@ -13,10 +13,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up JDK 1.8
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 8.0
java-version: 17.0
distribution: temurin
cache: maven

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
- Upgrade to OpenClover 4.5.0 feature release. This version brings support for annotations on java types
and experimental support for Java 10-17. See the [OpenClover 4.5.0 release notes](http://openclover.org/doc/openclover-4.5.0-release-notes.html)
for more details.
- Require Java 11 or Java 17.
Refer to the [blog post](https://www.jenkins.io/blog/2022/06/28/require-java-11/) for more details about Java 11 and Java 17 support.
- Require Jenkins 2.387.3 or newer.

## Version 4.13.0 (March 3, 2022)

Expand Down
12 changes: 11 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
buildPlugin()
/*
See the documentation for more options:
https://github.com/jenkins-infra/pipeline-library/
*/
buildPlugin(
forkCount: '1C', // Run 1 test process per core
useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests
configurations: [
[platform: 'linux', jdk: 21],
[platform: 'windows', jdk: 17],
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

@MarkEWaite MarkEWaite Oct 6, 2023

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!

])
18 changes: 4 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.33</version>
<version>4.74</version>
</parent>
<artifactId>clover</artifactId>
<packaging>hpi</packaging>
Expand Down Expand Up @@ -34,17 +34,16 @@
<changelist>999999-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>
Copy link
Contributor

@marek-parfianowicz marek-parfianowicz Oct 6, 2023

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

Copy link
Contributor

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.

<clover.version>4.5.0</clover.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.289.x</artifactId>
<version>1500.ve4d05cd32975</version>
<artifactId>bom-2.387.x</artifactId>
<version>2483.v3b_22f030990a_</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -78,15 +77,6 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkCount>1C</forkCount>
<reuseForks>true</reuseForks>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import java.util.concurrent.TimeUnit;

import static com.gargoylesoftware.htmlunit.WebAssert.assertTextPresent;
import static org.htmlunit.WebAssert.assertTextPresent;
import static org.junit.Assert.assertNotNull;

public class CloverBuildActionTest {
Expand Down