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

Triggering a parameterized bamboo build through the API

Ozan Mindek June 22, 2011

I have a parameterized build that takes the name of the tag number to build off of as a plan parameter. Now, I'd like to trigger this build through an SVN hook or other script, but the tag number will be different in each case.

I found the updateAndBuild documentation, but it doesn't mention support for passing plan parameters through each call.

One other way I can think of is to call the ajax hook. I haven't tried this one yet, although it doesn't sound like the "right" thing for a utility script to invoke.

How can I achieve this?


As noted in the answer below, this should be done with a POST to the /queue resource:

<tt>POST</tt> — Adds a build to the build queue (e.g. <tt>/queue/</tt>MYPROJ1-MYPLAN1). No POST data required. Response will be empty.

This seems to be an undocumented feature, but any POST parameters passed along will be used to set / override the build parameters.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 28, 2011

You should use a startBuild() REST call, see API documentation.

Ozan Mindek June 29, 2011

Please see my note below

Ozan Mindek June 29, 2011

Thanks! It works.

Ozan Mindek October 23, 2011

I think this stopped working at some point, or I'm forgetting something. Could you please take a look at ?

0 votes
Ozan Mindek June 29, 2011

(Too long for a comment, so posting as answer)

Thanks for the response!

I'm trying to figure out what URL and verb this maps to. Is it a POST to /queue?

<tt>POST</tt> — Adds a build to the build queue (e.g. <tt>/queue/</tt>MYPROJ1-MYPLAN1). No POST data required. Response will be empty.

If that's the case then how should I pass along the build parameters? Just in the POST body?

AUG Leaders

Atlassian Community Events