How do I make and associate builds with pull requests?

My org has a self-hosted instance of Bitbucket/Stash.  I have git experience, but not much as a "git admin" (although git seems to require everyone to be an admin to some extent).

I've created a project and repo.  I did an initial checkin and push of a codebase, and also created and merged a pull request (from myself).  The basic process appears to work.  I'm only doing this to prototype enhancing the dev process for a real project and team I work on.

We use a Jenkins build server.

I need to understand all of my options for causing the creation of a pull request to automatically communicate with Jenkins to run a build of the source repository on the source branch, and to coordinate the results of that build with Bitbucket.  I've tried to browse the docs, but I can't find a clear story in there for how to do these things.

1 answer

I would recommend that you look at this plugin which will allow you to trigger builds in Jenkins based on pull request events.

https://marketplace.atlassian.com/plugins/se.bjurr.prnfs.pull-request-notifier-for-stash/server/overview

 

As for putting results back into Bitbucket, a script called by Jenkins can use the Bitbucket REST API to update the status for a particular commit:

https://developer.atlassian.com/bitbucket/server/docs/latest/how-tos/updating-build-status-for-commits.html

 

 

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,685 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