TeamCity REST API - Reuse Build Chain
Hi There
In the TeamCity portal, it is possible to re-run jobs in a build chain and they automatically reuse successful dependencies, avoiding triggering them again. How do you do this in the API? I need to be able to rerun a job without it triggering all of it's dependencies.
From the portal:
From the API:

I have tried taking various properties from the the last successful build and passing them with my POST, including build.counter, build.number, build.id as well as the counters and numbers relating to dependencies however; it always triggers a new build with all the dependencies, rather than just re-running the job from the chain I have specified.
Thanks
Please sign in to leave a comment.
Community update: TeamCity will reuse the builds as long as there are suitable builds (see the documentation) and this is allowed by the snapshot dependency settings (Do not run new build if there is a suitable one). In this case, one of the dependency builds was changed between the runs (a new build parameter was added) hence a new instance of that dependency was triggered.