Bamboo jobs history

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

Accepted Answer
0 votes

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

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

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

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]

/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.

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.

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published yesterday in Jira Ops

Jira Ops Early Access Program Update #1: Announcing our next feature and a new integration

Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...

289 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you