How to make Jenkins build the branch of a pull request when the pull request is created?

I'm using Bitbucket Server v4.9.0 and Jenkins 2.19.2.

Our team is now creating pull requests on feature branches.  We have Bitbucket configured to spawn a Jenkins build when the PR is merged to master, but I'd like to make Jenkins build the pull request branch when the pull request is created.  I'm not sure how to make this happen.  I have a feeling it will involve the "Pull Request Notifications" feature, but I don't understand how that works.  I've tried searching for documentation, but I can't find anything useful.

2 answers

Hi

you can use the "Pull request notifier for bitbucket" (https://marketplace.atlassian.com/plugins/se.bjurr.prnfs.pull-request-notifier-for-stash/server/overview)

and set the triggers as you need.

Thanks.  I had already started down that road.  With my initial setup, I found that even though the PRN was in place, I wasn't seeing builds being spawned from new pull requests.  I didn't see any errors, just nothing happened.  I later tried manually "curl"ing the Jenkins URL with the post info. With verbose output, I was able to determine there was an authentication problem, which I'm now addressing with other resources.

What I'm wondering at this point, is there any other way to get diagnostics from the pull request notification? Bitbucket is very quiet here.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

26,566 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you