1

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?

1

I personally use the Pull Request Notifier 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.