From 8eebf88c89aaa0147626b64269a7ef1a93984828 Mon Sep 17 00:00:00 2001 From: Tim Jacomb <21194782+timja@users.noreply.github.com> Date: Thu, 11 Apr 2024 00:38:25 +0100 Subject: [PATCH] Update `pipeline-model-definition` and fix related test (#2555) * Manage the versions of all Declarative dependencies * Update pipeline-model-definition to the published release --------- Co-authored-by: Devin Nusbaum Co-authored-by: Olivier Lamy Co-authored-by: Devin Nusbaum --- .../commons/stapler/export/ExportConfig.java | 3 ++ blueocean-git-pipeline/pom.xml | 2 +- .../GithubScmSaveFileRequest.java | 1 + .../rest/impl/pipeline/PipelineNodeTest.java | 4 +-- pom.xml | 36 ++++++++++++------- 5 files changed, 31 insertions(+), 15 deletions(-) diff --git a/blueocean-commons/src/main/java/io/jenkins/blueocean/commons/stapler/export/ExportConfig.java b/blueocean-commons/src/main/java/io/jenkins/blueocean/commons/stapler/export/ExportConfig.java index 6105fc09dec..d84810c23f0 100644 --- a/blueocean-commons/src/main/java/io/jenkins/blueocean/commons/stapler/export/ExportConfig.java +++ b/blueocean-commons/src/main/java/io/jenkins/blueocean/commons/stapler/export/ExportConfig.java @@ -1,5 +1,7 @@ package io.jenkins.blueocean.commons.stapler.export; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; + /** * Controls the output behaviour. * @@ -10,6 +12,7 @@ public class ExportConfig { * @deprecated * Use getter and setter */ + @SuppressFBWarnings(value="PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification="Preserve API compatibility") public boolean prettyPrint; private ClassAttributeBehaviour classAttribute = ClassAttributeBehaviour.IF_NEEDED; diff --git a/blueocean-git-pipeline/pom.xml b/blueocean-git-pipeline/pom.xml index 3af4e269187..4d4798b8bb8 100644 --- a/blueocean-git-pipeline/pom.xml +++ b/blueocean-git-pipeline/pom.xml @@ -37,7 +37,7 @@ org.eclipse.jgit org.eclipse.jgit.ssh.jsch - 6.6.1.202309021850-r + 6.9.0.202403050737-r diff --git a/blueocean-github-pipeline/src/main/java/io/jenkins/blueocean/blueocean_github_pipeline/GithubScmSaveFileRequest.java b/blueocean-github-pipeline/src/main/java/io/jenkins/blueocean/blueocean_github_pipeline/GithubScmSaveFileRequest.java index a61e4274214..9d6b0f9b381 100644 --- a/blueocean-github-pipeline/src/main/java/io/jenkins/blueocean/blueocean_github_pipeline/GithubScmSaveFileRequest.java +++ b/blueocean-github-pipeline/src/main/java/io/jenkins/blueocean/blueocean_github_pipeline/GithubScmSaveFileRequest.java @@ -122,6 +122,7 @@ public Object save(@NonNull String apiUrl, @Nullable String owner, @Nullable Str * * @return If new branch is created, sha of content.path on the new branch otherwise null */ + @SuppressFBWarnings(value = "NP_UNWRITTEN_FIELD", justification = "Fields populated reflectively when deserializing JSON to Java") private String createBranchIfNotPresent(String apiUrl, String owner, String repoName, String accessToken) throws IOException { //If no branch is provided or auto branch create flag is false then skip creation of branch if(StringUtils.isBlank(content.getBranch()) diff --git a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeTest.java b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeTest.java index b9c71a65a85..37cb76295ce 100644 --- a/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeTest.java +++ b/blueocean-pipeline-api-impl/src/test/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeTest.java @@ -2311,9 +2311,9 @@ public void submitInputPostBlockWithParallelStages() throws Exception { assertEquals("exit 1", steps.get(0).get("displayDescription")); assertEquals("17", steps.get(1).get("id")); assertEquals("hello stable", steps.get(1).get("displayDescription")); - assertEquals("47", steps.get(2).get("id")); + assertEquals("50", steps.get(2).get("id")); assertEquals("Hello World from post", steps.get(2).get("displayDescription")); - assertEquals("48", steps.get(3).get("id")); + assertEquals("51", steps.get(3).get("id")); assertEquals("Wait for interactive input", steps.get(3).get("displayName")); } diff --git a/pom.xml b/pom.xml index d56c8e450d4..71467cca0b4 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ org.jenkins-ci.plugins plugin - 4.74 + 4.81 @@ -32,11 +32,13 @@ when changing jenkins core version please remember to change it in Jenkinsfile as well jenkinsVersions and acceptance-tests/runner/scripts/args.sh --> - 2.401.3 + 2.426.3 javadoc-no-fork - 1.14.7 + 1.14.9 10.13.0 6.14.4 + + 2.2198.v41dd8ef6dd56 false 0.70 0.00 @@ -217,8 +219,8 @@ io.jenkins.tools.bom - bom-2.401.x - 2401.v7a_d68f8d0b_09 + bom-2.426.x + 2961.v1f472390972e import pom @@ -514,16 +516,26 @@ handy-uri-templates 2.1.8 - + - joda-time - joda-time - 2.10.5 + org.jenkinsci.plugins + pipeline-model-api + ${pipeline-model-definition.version} - com.google.errorprone - error_prone_annotations - 2.5.1 + org.jenkinsci.plugins + pipeline-model-definition + ${pipeline-model-definition.version} + + + org.jenkinsci.plugins + pipeline-model-extensions + ${pipeline-model-definition.version} + + + org.jenkinsci.plugins + pipeline-stage-tags-metadata + ${pipeline-model-definition.version}