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

Bitbucket pullrequest builder plugin not compatible with Workflow

    Details

    • Similar Issues:

      Description

      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

        Attachments

          Issue Links

            Activity

            owood Owen Wood created issue -
            owood Owen Wood made changes -
            Field Original Value New Value
            Summary Bitbucket pullrequest builder plugin not compatible with Jenkins core 1.6* Bitbucket pullrequest builder plugin not compatible with Workflow
            Description 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
            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
            jglick Jesse Glick made changes -
            Labels workflow
            Hide
            jglick 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.

            Show
            jglick 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.
            Hide
            scm_issue_link 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.

            Show
            scm_issue_link 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.
            Hide
            jglick Jesse Glick added a comment -

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

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

              People

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

                Dates

                • Created:
                  Updated: