Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-31749

Bitbucket pullrequest builder plugin not compatible with Workflow

      Using plugin with workflow causes the following when loading job:

      SEVERE: Failed Loading job my-workflow-job
      java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to hudson.model.AbstractProject
      	at bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.BitbucketBuildTrigger.start(BitbucketBuildTrigger.java:23)
      	at org.jenkinsci.plugins.workflow.job.WorkflowJob.onLoad(WorkflowJob.java:132)
      	at hudson.model.Items.load(Items.java:320)
      	at jenkins.model.Jenkins$17.run(Jenkins.java:2651)
      	at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
      	at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
      	at jenkins.model.Jenkins$7.runTask(Jenkins.java:904)
      	at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
      	at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

      Plugins:

      • bitbucket-pullrequest-builder@1.4.7
      • workflow-job@1.11"

      Jenkins: Jenkins ver. 1.609.3.1 (CloudBees Jenkins Enterprise 15.05)

      See attached job config.xml to reproduce

          [JENKINS-31749] Bitbucket pullrequest builder plugin not compatible with Workflow

          Owen Wood created issue -
          Owen Wood made changes -
          Description Original: Plugin still relies on core 1.509.4. Causes the following issue loading a job when used with workflow 1.11 and Jenkins core 1.6*.

          Throws following when loading job:

          {code}
          SEVERE: Failed Loading job my-workflow-job
          java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to hudson.model.AbstractProject
          at bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.BitbucketBuildTrigger.start(BitbucketBuildTrigger.java:23)
          at org.jenkinsci.plugins.workflow.job.WorkflowJob.onLoad(WorkflowJob.java:132)
          at hudson.model.Items.load(Items.java:320)
          at jenkins.model.Jenkins$17.run(Jenkins.java:2651)
          at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
          at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
          at jenkins.model.Jenkins$7.runTask(Jenkins.java:904)
          at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
          at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
          {code}

          Plugins:

          * bitbucket-pullrequest-builder@1.4.7
          * workflow-job@1.11"

          Jenkins: Jenkins ver. 1.609.3.1 (CloudBees Jenkins Enterprise 15.05)

          See attached job config.xml to reproduce
          New: Using plugin with workflow causes the following when loading job:

          {code}
          SEVERE: Failed Loading job my-workflow-job
          java.lang.ClassCastException: org.jenkinsci.plugins.workflow.job.WorkflowJob cannot be cast to hudson.model.AbstractProject
          at bitbucketpullrequestbuilder.bitbucketpullrequestbuilder.BitbucketBuildTrigger.start(BitbucketBuildTrigger.java:23)
          at org.jenkinsci.plugins.workflow.job.WorkflowJob.onLoad(WorkflowJob.java:132)
          at hudson.model.Items.load(Items.java:320)
          at jenkins.model.Jenkins$17.run(Jenkins.java:2651)
          at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
          at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
          at jenkins.model.Jenkins$7.runTask(Jenkins.java:904)
          at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
          at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
          {code}

          Plugins:

          * bitbucket-pullrequest-builder@1.4.7
          * workflow-job@1.11"

          Jenkins: Jenkins ver. 1.609.3.1 (CloudBees Jenkins Enterprise 15.05)

          See attached job config.xml to reproduce
          Summary Original: Bitbucket pullrequest builder plugin not compatible with Jenkins core 1.6* New: Bitbucket pullrequest builder plugin not compatible with Workflow
          Jesse Glick made changes -
          Labels New: workflow

          Jesse Glick added a comment -

          Guide

          The reason this appears as an exception is that this code is wrong. With that fixed, this trigger would not even appear as an option.

          Jesse Glick added a comment - Guide The reason this appears as an exception is that this code is wrong. With that fixed, this trigger would not even appear as an option.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          COMPATIBILITY.md
          http://jenkins-ci.org/commit/workflow-plugin/14acc2b6fa04333fa2d93593bb0ecc617df63446
          Log:
          JENKINS-28632 JENKINS-31749 Noting.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: COMPATIBILITY.md http://jenkins-ci.org/commit/workflow-plugin/14acc2b6fa04333fa2d93593bb0ecc617df63446 Log: JENKINS-28632 JENKINS-31749 Noting.

          Jesse Glick added a comment -

          For most purposes you should instead use cloudbees-bitbucket-branch-source.

          Jesse Glick added a comment - For most purposes you should instead use cloudbees-bitbucket-branch-source .
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 167192 ] New: JNJira + In-Review [ 182630 ]
          Andrew Bayer made changes -
          Labels Original: workflow New: pipeline workflow
          Andrew Bayer made changes -
          Labels Original: pipeline workflow New: pipeline
          Ilja Gaitsenja made changes -
          Link New: This issue relates to JENKINS-40702 [ JENKINS-40702 ]

            Unassigned Unassigned
            owood Owen Wood
            Votes:
            9 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated: