2

I have multiple branches that are being tested under a single project and I'm currently using following command to show build statuses:

"/guestAuth/app/rest/builds?locator=project:<Project_Name>,running:any,branch:branched:any,count:20

Can limit the rest api to show just one build per branch?

skutzi
  • 77
  • 6

1 Answers1

0

Can you please be more specific? If you give us some example (e.g. "I have build configuration with builds A(steps a,b,c), B(steps d,e) , C(step f). A is from branch branch_A, B from branch_B" and so on so we have some clue how your setup looks like and what do you want to achieve.

You can check a permalinks for "latest successful build". You can also ask for specific build status, not a whole project.

Krzysztof Wolny
  • 10,576
  • 4
  • 34
  • 46
  • In my case, we publish docker images of a group of projects together using the same branch name. I want to see the git revision of the latest successful build of that branch in each project; to check if the latest commit in origin/branch is used (instead of an old one, e.g. due to a recent failed build). I can get this using `locator=branch:dev,buildType(template:publish_docker_image),state:finished,status:success,count:30&fields=count,build(id,buildTypeId,status,revisions(revision(version)))`, only culprit is multiple builds per project. – Halil Özgür Dec 07 '16 at 10:48