diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 096efc3b..c77fafa1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -14,6 +14,7 @@ jobs:
build:
strategy:
matrix:
+ java: [ '11', '17' ]
os: [ 'ubuntu-latest', 'windows-latest', 'macos-latest' ]
runs-on: ${{ matrix.os }}
@@ -23,7 +24,7 @@ jobs:
- uses: actions/setup-java@v3
with:
- java-version: 11
+ java-version: ${{ matrix.java }}
distribution: adopt
- run: mvn --batch-mode verify
diff --git a/Jenkinsfile b/Jenkinsfile
index c432705b..92f89834 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -1,7 +1,8 @@
+// `buildPlugin` step provided by: https://github.com/jenkins-infra/pipeline-library
+
buildPlugin(
useContainerAgent: true,
failFast: false,
- configurations: [
- [platform: 'linux', jdk: 11],
- [platform: 'windows', jdk: 11],
-])
+ platforms: ['linux', 'windows'],
+ jdkVersions: [11]
+)
diff --git a/pom.xml b/pom.xml
index 6df3e65c..87735c1a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,6 +23,7 @@
+
Build History Manager
Jenkins plugin that allows to build complex rules to decide when and which builds should be removed from the
@@ -53,7 +54,7 @@
HEAD
- jenkins
+ Jenkins
https://ci.jenkins.io/job/Plugins/job/build-history-manager-plugin/
@@ -167,14 +168,14 @@
org.apache.maven.plugins
maven-release-plugin
- 2.5.3
+ 3.0.1
-
-
+
+
org.jenkins-ci.plugins
token-macro
diff --git a/src/test/java/pl/damianszczepanik/jenkins/buildhistorymanager/BuildHistoryManagerTest.java b/src/test/java/pl/damianszczepanik/jenkins/buildhistorymanager/BuildHistoryManagerTest.java
index ea5c140c..d92cc98d 100644
--- a/src/test/java/pl/damianszczepanik/jenkins/buildhistorymanager/BuildHistoryManagerTest.java
+++ b/src/test/java/pl/damianszczepanik/jenkins/buildhistorymanager/BuildHistoryManagerTest.java
@@ -18,7 +18,7 @@
import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
-import pl.damianszczepanik.jenkins.buildhistorymanager.model.ConditionBuilder;
+import pl.damianszczepanik.jenkins.buildhistorymanager.model.ConditionBuilder.NegativeCondition;
import pl.damianszczepanik.jenkins.buildhistorymanager.model.Rule;
import pl.damianszczepanik.jenkins.buildhistorymanager.model.RuleBuilder;
import pl.damianszczepanik.jenkins.buildhistorymanager.model.RuleConfiguration;
@@ -72,7 +72,7 @@ public void getRules_ReturnsRules() {
public void perform_InitializesRule() throws IOException, InterruptedException {
// given
- Rule rule = new Rule(Arrays.asList(new ConditionBuilder.NegativeCondition()), null);
+ Rule rule = new Rule(List.of(new NegativeCondition()), null);
Deencapsulation.setField(rule, "matchedTimes", 1);
BuildHistoryManager discarder = new BuildHistoryManager(Arrays.asList(rule));
Job, ?> job = JobBuilder.buildSampleJob();