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

How to trigger a build in Bamboo if codes are in Stash/Git?

Zhe Lv May 28, 2013

I'm using Bamboo to do automation build on Win 7. The trigger method is "Repository triggers the build when changes are commited".

If I use a Git server deployed in cygwin with ssh protocol. I can modify "post-receive" to make the trigger work well.

However, Stash does not support cygwin. And stash has its own Git server. Now I can't trigger Bamboo to build if new codes are checked in. Is there a way to make the auto-build happen?

4 answers

1 accepted

0 votes
Answer accepted
Sultan Maiyaki
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.
May 28, 2013

Hi Zhe,

This feature is not yet available but we have a skeletal plugin described here that allows you to ping a URL after a push to the stash server.

Sorry that you will have to build the plugin youself which is kind of involving :)

2 votes
Stephan Wentz March 12, 2014

+1 for Werners answer.

There is a post commit hook for jenkins, but not for bamboo? Indeed, this is unexpected.

1 vote
Werner Van Rensburg February 16, 2014

We bought Stash since we assumed that staying in the Atlassian family of products would be beneficial.

It's weak that you don't support Stash as a native trigger in Bamboo. Its your products after all!?

Should have rather hosted my code at Github or BitBucket instead.

Werner Van Rensburg March 12, 2014

Followup:

I installed the External Hooks plugin and then execute curl on the host to post to bamoo to trigger a plan.

This does not solve the issue of triggering builds for your plan's branch builds though. I'm considering to wrap curl in a script and accordingly fire a post to the relevant URIs depending on the commit. Will post a followup message here if I make progress on this.

Just a pointer for the external hooks plugin, each param should be on a new line.

A template to use:

--user
<username>:<password>
-X
POST
-d
JOB1&ExecuteAllStages
https://<bamboo url>/rest/api/latest/queue/<Project>-<Plan>
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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events