bitbucket-push-and-pull-request-plugin icon indicating copy to clipboard operation
bitbucket-push-and-pull-request-plugin copied to clipboard

Multibranch Pipeline is not triggered when a PR is created

Open MorgeMoensch opened this issue 2 years ago • 2 comments

Hello, thanks for the cool plugin!

What I would like to do:

  • Run Pipeline on PR opened
  • Run Pipeline on PR updated with commits

What doesn't work:

A new multibranch-pipeline isn't initiated when I open a Pull Request. The Webhook from Bitbucket Server works image

And From Manage Jenkins > System Log > All Logs I can see that it is received successfully: image

However, no new pipeline gets created. When I trigger 'Scan Multibranch Pipeline Now' via the Jenkins UI, it shows up and gets run. However, the result is not propagated back to the Bitbucket PR as it is with the PR Updated triggers.

I would be okay with automatically scanning the multibranch pipeline every x minutes, but I would need the pipeline results to be propagated to the PR.

Does anyone have an idea what I'm missing here?

Below is the configuration from my Jenkinsfile:

properties([
  pipelineTriggers([
    [
      $class: 'BitBucketPPRTrigger',
      triggers : [
        [          
          $class: 'BitBucketPPRPullRequestServerTriggerFilter',
          actionFilter: [
            $class: 'BitBucketPPRPullRequestServerCreatedActionFilter',
          ]
        ],
        [
          $class: 'BitBucketPPRPullRequestServerTriggerFilter',
          actionFilter: [
            $class: 'BitBucketPPRPullRequestServerSourceUpdatedActionFilter',
          ]
        ]
      ]
    ]
  ])
])

MorgeMoensch avatar Jul 04 '23 09:07 MorgeMoensch

Hello @MorgeMoensch, I am facing the same issue... Would you happen to have any updates or suggestions?

alifiroozi80 avatar Sep 21 '23 16:09 alifiroozi80

Hi @alifiroozi80

We implemented the following workaround:

  • Create a dummy file (pipeline-trigger.md for example)
  • Create a branch, do your work, open a PR
  • Edit pipeline-trigger.md and push it (this should now trigger the PR, as it is a change in an already opened PR, which works)

Since we will move away from Jenkins in the near-term, I will not invest more time in this issue. Good luck!

MorgeMoensch avatar Sep 21 '23 16:09 MorgeMoensch