How to start second build from build step?

I have a build that performs a few steps, then I want it to start a second project building before continuing itself. As I need a second project to start running while this first build is half way through. (parallel testing jobs).

How do I start a build running from within another build?

0
1 comment

Hi Andy,

 

this falls down to the build runner being able to do so. If you need to start a TeamCity build from within it, then the easiest way would be to trigger a build via the REST API: https://www.jetbrains.com/help/teamcity/rest-api.html#RESTAPI-TriggeringaBuild

 

Simply make a REST request to the server to trigger the build you are interested in.

 

This said, this seems a bit of a weird scenario. A usual approach here would be to split the original build on multiple build configurations, and split it at the point at which it requires the other build to be started. Then set snapshot dependencies between them, so that they are run in the expected order (the testing build would wait until the initial one is started, but then could be run in parallel with others that aren't dependant on it).

 

Hope this makes sense.

0

Please sign in to leave a comment.