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

Determine parent/child dependencies of each plan in Bamboo through REST api?

jim.anderson January 9, 2013

We're using ivy to manage dependencies of a large project. (50+ components). I've not found a way to get bamboo to use the ivy.xml files to generate the build dependencies (parent/child relationships in the build plans).

Not being able to find this, I'm trying to find a way to use the REST api to pull the set of dependencies in bamboo for each plan (so I can automate a check to make sure it matches). Unfortunately I can't seem to find any information out of the rest api about plans other than the basics:

Key
Name
Description
Short key
Short name
Enabled
Is active
Is building
Is favourite
Average build time (seconds)
Link

Is there some way to get this info out of rest?

Better yet, is there a way to get bamboo to use the ivy.xml file automatically instead of having to populate the parent/child relationships manually?

Sorry if this is an obvious question. I've spent a good deal of time with the online docs for the rest API as well exploring all the options for the BambooCLI tool (which is quite cool), but couldn't find this info.

Thanks!

jima

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Answer accepted
PiotrA
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.
January 9, 2013

Hello,

I think that you could try using something like

curl -u admin:admin http://localhost:8085/bamboo/rest/api/latest/dependency/search/PROJ-PARENT/child?searchTerm=""

curl -u admin:admin http://localhost:8085/bamboo/rest/api/latest/dependency/search/PROJ-CHILD/parent?searchTerm=""

...to determine dependencies for a given plan. Can you try this and tell if this help somehow in your situation? I reckon these are REST resources that aren't documented yet (AFAIK they are since Bamboo 4.3).

regards,

jim.anderson January 9, 2013

Ack! I think I see why it doesn't work. We're on Bamboo 4.2.1. Any way to do this on this version?

Thanks for the quick response!

That returns:

<status><status-code>404</status-code><message>null for uri: http://fcbuildmaster.pelco.org/builds/rest/api/latest/dependency/search/OM2COMP-PCP2APPLICATIONS/parent?searchTerm=%22*%22&os_authType=basic</message></status>

For both the child and parent versions. I did double check that this PROJ-PLAN combo produced results for this query:

http://fcbuildmaster.pelco.org/builds/rest/api/latest/plan/OM2COMP-PCP2APPLICATIONS?os_authType=basic

and that it does, indeed have parent and child dependencies.

Thanks again for the help. Is there any on-line method I could use for finding APIs like this, or is this really the only way?

thanks

jima

TAGS
AUG Leaders

Atlassian Community Events