diff --git a/README.md b/README.md index b1a274d..7207a3b 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 603ed34..39f55cf 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 29fe600..eed8469 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());