From f6d65b2fa382122badfeec737e785719383ad7c2 Mon Sep 17 00:00:00 2001 From: Daniel Heid Date: Sat, 12 Oct 2024 15:34:02 +0200 Subject: [PATCH] Upgraded to Jenkins 2.462.3 --- .editorconfig | 3 + .java-version | 1 + README.md | 6 + pom.xml | 328 +++++++++--------- .../ConfigurableMatrixAggregator.java | 14 +- .../MatrixPostBuildScript.java | 37 +- .../postbuildscript/PostBuildScript.java | 60 ++-- .../postbuildscript/logging/Logger.java | 18 +- .../LoggerInitializationException.java | 1 - .../postbuildscript/model/Configuration.java | 5 +- .../postbuildscript/model/ExecuteOn.java | 2 - .../postbuildscript/model/PostBuildItem.java | 4 +- .../postbuildscript/model/PostBuildStep.java | 8 +- .../plugins/postbuildscript/model/Role.java | 4 +- .../plugins/postbuildscript/model/Script.java | 4 +- .../postbuildscript/model/ScriptFile.java | 3 +- .../postbuildscript/processor/Processor.java | 43 +-- .../processor/ProcessorFactory.java | 13 +- .../processor/rules/ExecutionRule.java | 1 - .../processor/rules/MatrixRule.java | 2 - .../processor/rules/ResultRule.java | 3 +- .../processor/rules/RoleRule.java | 4 +- .../postbuildscript/service/Command.java | 11 +- .../service/CommandExecutor.java | 21 +- .../postbuildscript/service/Content.java | 4 +- .../service/GroovyScriptExecutor.java | 17 +- .../service/GroovyScriptExecutorFactory.java | 3 +- .../service/GroovyScriptPreparer.java | 14 +- .../service/LoadFileCallable.java | 3 +- .../service/LoadScriptContentCallable.java | 4 +- .../service/ScriptFilePath.java | 13 +- .../ConfigurableMatrixAggregatorTest.java | 27 +- .../MatrixPostBuildScriptTest.java | 37 +- .../PostBuildScriptExceptionTest.java | 10 +- .../postbuildscript/PostBuildScriptIT.java | 77 ++-- .../postbuildscript/PostBuildScriptTest.java | 28 +- .../postbuildscript/logging/LoggerTest.java | 36 +- .../model/ConfigurationTest.java | 23 +- .../postbuildscript/model/ExecuteOnTest.java | 5 +- .../model/PostBuildItemTest.java | 23 +- .../model/PostBuildStepTest.java | 26 +- .../postbuildscript/model/ScriptFileTest.java | 12 +- .../postbuildscript/model/ScriptTest.java | 15 +- .../processor/rules/MatrixRuleTest.java | 19 +- .../processor/rules/ResultRuleTest.java | 18 +- .../processor/rules/RoleRuleTest.java | 20 +- .../service/CommandExecutorIT.java | 13 +- .../postbuildscript/service/ContentTest.java | 17 +- .../GroovyScriptExecutorFactoryTest.java | 14 +- .../service/GroovyScriptExecutorIT.java | 15 +- .../service/GroovyScriptPreparerTest.java | 38 +- .../service/LoadFileCallableTest.java | 21 +- .../LoadScriptContentCallableTest.java | 8 +- 53 files changed, 473 insertions(+), 683 deletions(-) create mode 100644 .java-version diff --git a/.editorconfig b/.editorconfig index d1f040a..25d30b5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,5 +8,8 @@ insert_final_newline = true indent_style = space indent_size = 4 +[*.xml] +indent_size = 2 + [*.md] trim_trailing_whitespace = false diff --git a/.java-version b/.java-version new file mode 100644 index 0000000..98d9bcb --- /dev/null +++ b/.java-version @@ -0,0 +1 @@ +17 diff --git a/README.md b/README.md index 23263b7..adc5ded 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,12 @@ the PR from the JIRA issue. ## Release Notes +### Version 3.4.0 + +* Upgraded to Jenkins Plugin POM 5.1 +* Upgraded to Jenkins 2.462.3 +* Reformatted source code with Spotless + ### Version 3.3.0 * Upgraded to Jenkins 2.452 diff --git a/pom.xml b/pom.xml index 4f84967..c5bda27 100644 --- a/pom.xml +++ b/pom.xml @@ -1,169 +1,169 @@ + - 4.0.0 - - - org.jenkins-ci.plugins - plugin - 5.1 - - - postbuildscript - hpi - Jenkins PostBuildScript Plugin - ${revision}-${changelist} - https://plugins.jenkins.io/postbuildscript - 2011 - A plugin for the Jenkins CI to run several configurable actions after - a build, depending on the build result. - - - - 3.3.0 - 999999-SNAPSHOT - jenkinsci/postbuildscript-plugin - 2.452.2 - 3.0.0 - - - - jira - https://issues.jenkins-ci.org/browse - - - - Jenkins - https://ci.jenkins.io/job/Plugins/job/postbuildscript-plugin/ - - -
mail@daniel-heid.de
-
-
-
- - - https://updates.jenkins-ci.org/download/plugins/postbuildscript - - - - - MIT license - All source code is under the MIT license. - https://opensource.org/licenses/MIT - - - - - - gbois - Gregory Boissinot - +1 - - Initiator and previous maintainer (until 2015) - - - - dheid - Daniel Heid - mail@daniel-heid.de - https://www.daniel-heid.de/ - - Maintainer (since 2017) - - - - - - - Nicolas De loof - https://blog.loof.fr - CloudBees - https://www.cloudbees.com/ - - - Simon Edwardsson - - - ChakaZulu - - - Rob Petti - http://robpetti.com - OpenText - https://www.opentext.com/ - - - Markus Alexander Kuppe - https://www.lemmster.de/ - - - Dan Clayton - - - - - scm:git:https://github.com/${gitHubRepo}.git - scm:git:git@github.com:${gitHubRepo}.git - https://github.com/${gitHubRepo} - ${scmTag} - - + 4.0.0 + + + org.jenkins-ci.plugins + plugin + 5.1 + + + postbuildscript + ${revision}-${changelist} + hpi + Jenkins PostBuildScript Plugin + A plugin for the Jenkins CI to run several configurable actions after + a build, depending on the build result. + https://plugins.jenkins.io/postbuildscript + 2011 + + + + MIT license + https://opensource.org/licenses/MIT + All source code is under the MIT license. + + + + + + gbois + Gregory Boissinot + + Initiator and previous maintainer (until 2015) + + +1 + + + dheid + Daniel Heid + mail@daniel-heid.de + https://www.daniel-heid.de/ + + Maintainer (since 2017) + + + + + + + Nicolas De loof + https://blog.loof.fr + CloudBees + https://www.cloudbees.com/ + + + Simon Edwardsson + + + ChakaZulu + + + Rob Petti + http://robpetti.com + OpenText + https://www.opentext.com/ + + + Markus Alexander Kuppe + https://www.lemmster.de/ + + + Dan Clayton + + + + + scm:git:https://github.com/${gitHubRepo}.git + scm:git:git@github.com:${gitHubRepo}.git + ${scmTag} + https://github.com/${gitHubRepo} + + + + jira + https://issues.jenkins-ci.org/browse + + + + Jenkins + https://ci.jenkins.io/job/Plugins/job/postbuildscript-plugin/ + + +
mail@daniel-heid.de
+
+
+
+ + + https://updates.jenkins-ci.org/download/plugins/postbuildscript + + + + 3.4.0 + 999999-SNAPSHOT + jenkinsci/postbuildscript-plugin + 2.462.3 + 2228.v919b_5883c444 + 3.0.0 + + + - - - org.jenkins-ci.plugins - matrix-project - - - - org.mockito - mockito-junit-jupiter - test - - + + io.jenkins.tools.bom + bom-2.462.x + 3387.v0f2773fa_3200 + pom + import + - - - - - io.jenkins.tools.bom - bom-2.452.x - 3435.v238d66a_043fb_ - import - pom - - - - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - - - - repo.jenkins-ci.org - https://repo.jenkins-ci.org/public/ - - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - - - - integration-test - verify - - - - - - + + + + + + org.jenkins-ci.plugins + matrix-project + + + + org.mockito + mockito-junit-jupiter + test + + + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + + + repo.jenkins-ci.org + https://repo.jenkins-ci.org/public/ + + + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + + + integration-test + verify + + + + + +
- diff --git a/src/main/java/org/jenkinsci/plugins/postbuildscript/ConfigurableMatrixAggregator.java b/src/main/java/org/jenkinsci/plugins/postbuildscript/ConfigurableMatrixAggregator.java index 3f4eff9..ae862aa 100644 --- a/src/main/java/org/jenkinsci/plugins/postbuildscript/ConfigurableMatrixAggregator.java +++ b/src/main/java/org/jenkinsci/plugins/postbuildscript/ConfigurableMatrixAggregator.java @@ -5,12 +5,11 @@ import hudson.matrix.MatrixBuild; import hudson.matrix.MatrixRun; import hudson.model.BuildListener; +import java.io.IOException; import org.jenkinsci.plugins.postbuildscript.logging.Logger; import org.jenkinsci.plugins.postbuildscript.processor.Processor; import org.jenkinsci.plugins.postbuildscript.processor.ProcessorFactory; -import java.io.IOException; - public class ConfigurableMatrixAggregator extends MatrixAggregator { private final Processor processor; @@ -19,12 +18,11 @@ public class ConfigurableMatrixAggregator extends MatrixAggregator { private final Logger logger; public ConfigurableMatrixAggregator( - MatrixBuild build, - Launcher launcher, - BuildListener listener, - ProcessorFactory processorFactory, - Class initiator - ) { + MatrixBuild build, + Launcher launcher, + BuildListener listener, + ProcessorFactory processorFactory, + Class initiator) { super(build, launcher, listener); this.initiator = initiator; processor = processorFactory.createMatrixProcessor(build, launcher, listener); diff --git a/src/main/java/org/jenkinsci/plugins/postbuildscript/MatrixPostBuildScript.java b/src/main/java/org/jenkinsci/plugins/postbuildscript/MatrixPostBuildScript.java index 476268e..e5ff0e9 100644 --- a/src/main/java/org/jenkinsci/plugins/postbuildscript/MatrixPostBuildScript.java +++ b/src/main/java/org/jenkinsci/plugins/postbuildscript/MatrixPostBuildScript.java @@ -11,6 +11,7 @@ import hudson.model.BuildListener; import hudson.tasks.BuildStepDescriptor; import hudson.tasks.Publisher; +import java.util.Collection; import org.jenkinsci.plugins.postbuildscript.model.PostBuildStep; import org.jenkinsci.plugins.postbuildscript.model.Script; import org.jenkinsci.plugins.postbuildscript.model.ScriptFile; @@ -18,43 +19,26 @@ import org.jenkinsci.plugins.postbuildscript.processor.ProcessorFactory; import org.kohsuke.stapler.DataBoundConstructor; -import java.util.Collection; - public class MatrixPostBuildScript extends PostBuildScript { @DataBoundConstructor public MatrixPostBuildScript( - Collection genericScriptFiles, - Collection groovyScriptFiles, - Collection