trigger multiple builds simultaneously
To get in context, we are currently running builds (A) (A1) (A2) ....., which is triggered by a successful run of another build (B). (B) is versioned, so there are potentially many versions of (B).
We want to trigger all those builds (A) (A1) (A2).... with only the pinned version of (B) with a specific tag if it exists.
So the point here is that whenever we start a build (for example, (A)), we first check in build (B) to see if there is a pinned version with a specific tag, and then trigger all the other builds. and if there is not, the latest version of (B) is set to be the main version of the build we just started (A).
Any suggestion ?
Thanks in advance
Please sign in to leave a comment.
Hello,
Sounds like the easiest way to do so would be via REST API. This article shows some examples on how to start a build via REST, and this one provides guidance on retrieving builds via REST.
In essence, you would need to:
1) find a pinned tagged build in B, if it exists, take its build ID, otherwise start a new build at a given revision and use its build ID;
2) for every build that has dependency on B, start them with the snapshot-dependencies section in the request body:
This would make the newly started A' builds use specified build ID as a dependency.
Thank you for your reply, I have managed to solve this problem by using the REST API as you mentioned above.