How do I trigger a build promotion via Rest API?

We have a pretty complex build chain that finishes with an 'Archive Build' step, this chain occurs on roughly 5-7 different branches simultaneously.
I have two separate 'promote build' jobs that have an artifact dependency on the 'Archive' job.

I'm looking for a scriptable method to select a specific build of 'Archive Build' on a specific branch, and trigger a build on one of the 'promote build' jobs with a customized parameter.

Is this possible?

1 comment
Comment actions Permalink

Hi Jim,

You can set a build as artifact dependency when triggering a new build via REST API. Basic idea is to trigger a build manually and check how it looks through REST API in the queue, then use alike presentation to queue new builds. Setting snapshot dependencies is also available, but that is less likely to produce desired results as the build should also be forced to use correct changes.


Please sign in to leave a comment.