Configuration for Pull-Request-only builds


Our builds take usually 40 minutes (already using IncrediBuild distributing to 10 machines). Creating installers takes again about 30 minutes, installers are about 2GB large (compressed). Artifacts are even bigger (C++ native Windows software).

We use git-flow and before a pull-request is allowed to be merged it has to pass a build (no tests yet included). "Requires a minimum of <1> successful builds" is enabled in Stash.


Right now I use Jenkins with a refspec to checkout the pull-request branches. How do i configure a refspec in Bamboo? There is no such field anywhere. If I allow all branches to build, then the builds will just queue up. We have ~20 developers pushing several times a day to their branches. Build results become important for integrators only once a developer has created a pull-request and then it needs to have precedence over other builds.

(I spent the last whole week to search here and the internet for solutions/workarouns, but found nothing usefull; only obsolete/incomplete information.)


I would like my team to switch to Bamboo, but this (apart from Stash PR triggers not (yet?) working) is the only issue, which seems to block us.

BTW: Whats the difference between trigger types "Repository triggers..." and "Stash repository triggers..."? 


Bamboo version: 5.6.1
Stash version: 3.2.0
JIRA version: 6.2 


Best Regards, Mike

2 answers

0 votes

How do i configure a refspec in Bamboo?

You're not able to specify the whole refspec but you can specify branch name pattern and only those branches will be autocreated in Bamboo. More info here.

Whats the difference between trigger types "Repository triggers..." and "Stash repository triggers...

Stash repository trigger has a built-in fallback to a predefined polling if we diagnose that Stash is not able to remotely trigger builds in Bamboo.  

How would a regexp capturing pull-request branches only look like? Like so?:


 (we need build the source branch of a pull-request - only when a pull-request is active)


I'm not really sure if pull requests have a permanent branch in Stash. Maybe mark this question with Stash label as well?

So far i know, they don't. That's why i mentioned the refspec above. The refspec would be somthing like this: +refs/pull-requests/*/from:refs/remotes/origin/pr/*

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Statuspage

Introducing Statuspage Getting Started guides! First up: What is Statuspage?

Over the next several weeks we'll be sharing some of our Getting Started guides here in the community. Throughout this series of posts, we'd love to hear from customers and non-customers ab...

182 views 4 1
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