Trigger a build only if default branch of dependent build was successful?

Answered

Hello

we have configured a build to check Git for changes on master (configured as default branch) and pull requests. This works quite well.

What we would like to do now is having a dependent build that runs when the first build successfully build the master branch (and ignoring successful builds on the pull-request builds). And preferably using the same commit hash from it.

The second build will be used to publish artifacts - therefore we want to make sure we only start if the preconditions are ok (first build ok on master) and that we use the exact same version from git.

 

Is there a way to achieve this in TeamCity somehow?

 

 

1 comment

Hello Werner,

You can use Finish build trigger with branch filter to limit the branches where finished builds will trigger new builds of the current configuration. 

If you want to trigger build on the same revision, then also use snapshot dependency.

1

Please sign in to leave a comment.