Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can Stash commits trigger a Bamboo build?

Jeanne Nicole November 6, 2012

If not, when will this feature be added?

5 answers

1 accepted

0 votes
Answer accepted
jhinch (Atlassian)
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 6, 2012

Stash currently doesn't support this functionality directly but bamboo comes with scripts to trigger a build via a post-receive hook in the git repository. If you need to locate the repository on disk I would suggest using the Repository System Info Plugin. We will be looking at building this functionality into Stash in the future as well as other integration features.

Justin Johnson November 6, 2012

The documentation mentions a postCommitBuildTrigger.sh file for Git, but such a file doesn't exist in either the Bamboo 4.2.1 or 4.3 installations. I'm guessing it will look pretty identical to the other postCommitBuildTrigger.sh files though.

1 vote
rverschoor
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 31, 2014

As of Bamboo 5.6 this feature has been added.

See e.g. https://blogs.atlassian.com/2014/07/bamboo-5-6-enterprise-scale-ci-teams-sizes/

1 vote
gerardje7 November 15, 2013

You can do this by installing the Stash Web Post Hooks Plugin (free and from Atlassian).

On each repository you can then configure this webhook to trigger a build using the REST API of Bamboo.

An example REST url for triggering a build:
http://bamboo.atlassian.com/bamboo/api/rest/updateAndBuild.action?buildKey=PROJECT-PLAN

Daniel Tetzner November 27, 2013

This does not work for me. When I type this into a browser with my PROJECT-PLAN in the end the browser tells me "A build of ABC-XYZ was triggered by remote http call." Cool I thought. However, Bamboo isn't building anything.

john livingston April 17, 2014

Gerard's post with the example REST url was key for me.

Daniel's test by entering the url directly into a browser helped in debugging. I too eventually got "A build of PROJ-PLAN was triggered by remote http call." without a build initiating.

The final piece for me was adding the url pattern "/bamboo/api/rest/updateAndBuild" in the "Application Links - Incoming Authentication - Trusted Applications - URL Patterns" area.

0 votes
Lukas September 16, 2013

Hi everyone,

it seems to me that repository polling is not the most reliable thing in bamboo. Is there a trigger-builds-from-stash-feature available by now? And if not, is it on the list of feature requests?

Best,

Lukas

0 votes
Deleted user April 10, 2013

By the way, there is now an example hook plugin project now that allows you to ping a URL after a push to Stash:

https://developer.atlassian.com/stash/docs/2.3.0/how-tos/repo-hook-examples/async-post-receive-config.html

However, it requires a bit of knowledge of Java, Atlassian Plugin SDK & Maven.

After creating the JAR file, you can install it into Stash via its Administration interface.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events