Answers: <p>I personally use the <a href="https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket" rel="nofollow noreferrer">Pull Request Notifier</a> plugin for Bitbucket to trigger my Bitbucket Multibranch Pipeline builds in Jenkins.  Using the GUI configuration tools, you can configure the Pull Request Notifier plugin to trigger a build on any arbitrary PR action, including adding comments.</p>
  
  <p>However, you don't really need to use comments to trigger builds - there is a build trigger button in the PR view in Bitbucket, and you can also use the "Build Now" button in Jenkins to trigger a PR build.  Both of these seem a little bit easier to me than a magic comment.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-07-31T23:33:57.693Z
Answers: 2019-07-31T23:33:57.693Z
Answers: jayhendren
Body: <p>I have successfully configured a Jenkins multi-branch pipeline to build my project which is hosted on Bitbucket. I have separate pipeline requirements for the "develop" and "release" branches, and for merge requests. These are now working correctly (except for a surplus "PR-***" job whenever a Bitbucket PR is triggered).</p>
  
  <p>My remaining issue is:
  In old-style Jenkins I used Bitbucket Pull Request plugin, which had a feature "Comment phrase to trigger build". So in the event of a flaky unit test etc I could issue the trigger phrase as a comment in the pull request, and it would be rebuilt. </p>
  
  <p>How can I achieve this behaviour on a multi-branch pipeline?</p>
  
Tags: <jenkins><jenkins-pipeline><bitbucket>
Title: How to use comments to trigger rebuilds of Bitbucket pull-requests on Jenkins multi-branch pipeline
UserDisplayName: funkybro
ThreadText: # How to use comments to trigger rebuilds of Bitbucket pull-requests on Jenkins multi-branch pipeline
  
  (Asked by: username_0 on 2019-07-29)
  
  I have successfully configured a Jenkins multi-branch pipeline to build my project which is hosted on Bitbucket. I have separate pipeline requirements for the "develop" and "release" branches, and for merge requests. These are now working correctly (except for a surplus "PR-\*\*\*" job whenever a Bitbucket PR is triggered).
  
  My remaining issue is:
  In old-style Jenkins I used Bitbucket Pull Request plugin, which had a feature "Comment phrase to trigger build". So in the event of a flaky unit test etc I could issue the trigger phrase as a comment in the pull request, and it would be rebuilt.
  
  How can I achieve this behaviour on a multi-branch pipeline?
  
  **Tags:** jenkins, jenkins-pipeline, bitbucket
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-07-31. Score: 1
  
  I personally use the [Pull Request Notifier](https://github.com/tomasbjerre/pull-request-notifier-for-bitbucket) plugin for Bitbucket to trigger my Bitbucket Multibranch Pipeline builds in Jenkins. Using the GUI configuration tools, you can configure the Pull Request Notifier plugin to trigger a build on any arbitrary PR action, including adding comments.
  
  However, you don't really need to use comments to trigger builds - there is a build trigger button in the PR view in Bitbucket, and you can also use the "Build Now" button in Jenkins to trigger a PR build. Both of these seem a little bit easier to me than a magic comment.
  
  
  ---
  
  