REST API: How to queue a history build with snapshot dependencies

I have a build chain that I want to queue with a certain revision number such that all configs in the chain use that revision number (history build). I am using the addBuildToQueue method but am only able to queue this chain with the latest revision. Could someone please post an example request body that would queue a build as I've described?

0
3 comments

Hello Sean!

You may find an example of a request starting a build on a custom revision here. If your snapshot dependencies have Enforce revisions synchronization option enabled (by default, it is enabled), the dependencies should also run on the same revision. 

Please let me know if that helps.

0
Hello Sean
0

Thank you Fedor. The example you posted does look relevant to what I'm doing. I will also try using it if I have any further problems.

While waiting for a response I did find success making a queue request using a struct like so:

{
"buildTypeId": "ClientServerDeploy",
"revisions": {
"count": 1,
"revision": [
{
"version": "46704",
"vcsBranchName": "//project/main",
"vcs-root-instance": {
"vcs-root-id": "ProjectStreams",
},
},
{
"version": "080e80cb7f963da60cde680d18e784f51984ce75",
"vcsBranchName": "refs/heads/main",
"vcs-root-instance": {
"vcs-root-id": "GithubMain",
},
}
],
},
}
0

Please sign in to leave a comment.