From e1fb61452acda3210062e2271327b278bb9c76ea Mon Sep 17 00:00:00 2001 From: tzachs Date: Sat, 26 Feb 2022 16:15:40 +0200 Subject: [PATCH] JENKINS-41635 - fixed, updated pom.xml from 2.204.1 to 2.303.1 --- README.md | 3 +++ pom.xml | 2 +- .../com/cloudbees/jenkins/plugins/BitBucketPayload.java | 8 +++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b1a274db..7207a3be 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,9 @@ triggers{ ``` **Changelog** +#### TBD #### (26. Feb 2022) +- JENKINS-41635 - fixed. This required a change in Jenkins minimum version from 2.204.1 to 2.303.1 + #### 215.vfe32d14d1f47 #### (04. Feb 2022) - Fixed NPE diff --git a/pom.xml b/pom.xml index 603ed34a..39f55cf5 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ 999999-SNAPSHOT - 2.204.1 + 2.303.1 1.8 1.8 8 diff --git a/src/main/java/com/cloudbees/jenkins/plugins/BitBucketPayload.java b/src/main/java/com/cloudbees/jenkins/plugins/BitBucketPayload.java index 29fe6007..eed84692 100644 --- a/src/main/java/com/cloudbees/jenkins/plugins/BitBucketPayload.java +++ b/src/main/java/com/cloudbees/jenkins/plugins/BitBucketPayload.java @@ -1,9 +1,10 @@ package com.cloudbees.jenkins.plugins; +import edu.umd.cs.findbugs.annotations.NonNull; import hudson.EnvVars; -import hudson.model.AbstractBuild; import hudson.model.EnvironmentContributingAction; import hudson.model.InvisibleAction; +import hudson.model.Run; import javax.annotation.Nonnull; import java.util.logging.Level; @@ -27,10 +28,11 @@ public String getPayload() { } @Override - public void buildEnvVars(AbstractBuild abstractBuild, EnvVars envVars) { + public void buildEnvironment(@NonNull Run run, @NonNull EnvVars env) { + EnvironmentContributingAction.super.buildEnvironment(run, env); final String payload = getPayload(); LOGGER.log(Level.FINEST, "Injecting BITBUCKET_PAYLOAD: {0}", payload); - envVars.put("BITBUCKET_PAYLOAD", payload); + env.put("BITBUCKET_PAYLOAD", payload); } private static final Logger LOGGER = Logger.getLogger(BitBucketPayload.class.getName());