diff --git a/pom.xml b/pom.xml index bc69bca..a6fe044 100644 --- a/pom.xml +++ b/pom.xml @@ -6,18 +6,19 @@ org.jenkins-ci.plugins plugin - 1.609.1 + 3.54 - + bitbucket-build-status-notifier 1.4.3-SNAPSHOT hpi - 2.5.1 - 1.112 - 2.6 + + 2.176.2 + + 8 2.10 1.11 @@ -88,17 +89,17 @@ org.jenkins-ci.plugins.workflow workflow-step-api - ${workflow.version} + 2.22 org.jenkins-ci.plugins.workflow workflow-cps - ${workflow.version} + 2.80 org.jenkins-ci.plugins.workflow workflow-job - ${workflow.version} + 2.36 org.jenkins-ci.plugins.workflow @@ -153,46 +154,6 @@ - - - - org.jenkins-ci.tools - maven-hpi-plugin - ${maven-hpi-plugin.version} - true - - - - generate-taglib-interface - - - - - - org.apache.maven.plugins - maven-release-plugin - ${maven-release-plugin.version} - - deploy - - - - - org.apache.maven.plugins - maven-deploy-plugin - ${maven-deploy-plugin.version} - - - org.apache.maven.wagon - wagon-http - ${wagon-http.version} - jar - - - - - - repo.jenkins-ci.org diff --git a/src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusHelper.java b/src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusHelper.java index 5c03689..339a2b4 100644 --- a/src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusHelper.java +++ b/src/main/java/org/jenkinsci/plugins/bitbucket/BitbucketBuildStatusHelper.java @@ -59,7 +59,7 @@ import org.jenkinsci.plugins.bitbucket.validator.BitbucketHostValidator; import org.jenkinsci.plugins.displayurlapi.DisplayURLProvider; import org.jenkinsci.plugins.multiplescms.MultiSCM; -import org.jenkinsci.plugins.workflow.job.WorkflowJob; +import org.jenkinsci.plugins.workflow.job.WorkflowRun; import org.scribe.model.*; class BitbucketBuildStatusHelper { @@ -138,10 +138,9 @@ public static List createBuildStatusResources(fina Job project = build.getParent(); List buildStatusResources = new ArrayList(); - if (project instanceof WorkflowJob) { - Collection scms = ((WorkflowJob)project).getSCMs(); - - for (SCM scm : scms) { + if (build instanceof WorkflowRun) { + WorkflowRun workflowRun = (WorkflowRun)build; + for (SCM scm : workflowRun.getSCMs()) { buildStatusResources.addAll(createBuildStatusResources(scm, build)); } } else if (project instanceof AbstractProject) {