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

Bamboo jobs history

Abhi Vaishnav [X] January 14, 2014

Hi,

I want to create a report on the history of a specific job (passed vs failed) - not a plan.

Specifically, I want to know what percentage of the time a build job passes. I can get this at the plan (a plan has a build and test job) but I can't seem to get it at the job level.

Is that possible with Bamboo or Bamboo CLI? Even if can get the list of buids for a given job, I can write a script to parse and create the report myself, but I can't seem to get the list of builds for a given job...

2 answers

1 accepted

0 votes
Answer accepted
Jason Monsorno
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 14, 2014

/rest/api/latest/result/PROJECT-PLAN-JOB

Abhi Vaishnav [X] January 14, 2014

Won't this give me the result of only the latest run?

Jason Monsorno
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 15, 2014

It gave me the entire history, why don't you try it.

Abhi Vaishnav [X] January 15, 2014

Oh you are right; it did give me the latest 25 results...

I know I can do ?expand=results[25:100].results and get results for 25-100, but any chance you know how to get those results in .json format?

Doing

/rest/api/latest/result/ROBHEAD-LIN32-JOB1.json?expand=results[25:100].result

Does not give it to me in JSON format... what am I doing wrong? (neither does putting the .json at the end of .result)... [And I'm new to REST, so sorry if this is a beginners question]

Jason Monsorno
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 15, 2014
/rest/api/latest/result/ROBHEAD-LIN32-JOB1.json?start-index=25&max-result=76

Indices start at 0, by default Bamboo will only return 25 results so above is the typical way to get a later subset. If you're more comfortable with your format you can still use it like this:

/rest/api/latest/result/ROBHEAD-LIN32-JOB1.json?max-result=0&expand=results[25:100].result

The main side effect I see is the size attribute goes from the result count to the entire set count.

Abhi Vaishnav [X] January 20, 2014

I ended up modifying the the first route of:

/rest/api/latest/result/ROBHEAD-LIN32-JOB1.json?start-index=startIndex&max-result=10

and having a start Index that increases by 10 in each iteration of the loop.

0 votes
Abhi Vaishnav [X] January 14, 2014

Won't that give me just the result of the latest run?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events