TeamCity 7.0 Help

Snapshot Dependencies

Setting the dependency by other build's sources you can ensure that a build will start only after the one it depends from is run and finished. See details at Snapshot Dependency.

To add a snapshot dependency, on the Dependencies page of the build configuration settings, click the Add new snapshot dependency and specify the following options:

Option

Description

Depend on

Specify the build configuration that the current build configuration should depend on.

Do not run new build if there is a suitable one

If the option is enabled, TeamCity will not run a dependency build, if another running or finished dependency build with appropriate sources revisions exists. See also #Suitable Builds below. However, when a build is triggered, the dependency build will also be put into the queue . Then, when the changes for the build chain are collected, this dependency build will be removed from the queue and dependency will be set to a suitable finished build.

Only use successful builds from suitable ones

A new triggered build will only "use" successfully finished suitable builds as dependencies. If the latest finished "suitable" build is failed, it will be re-run.

Run this build if dependency has failed

If enabled and dependency fails, the build of this build configuration will still be run. The build status will be set to failed. If the option is not set, the build on the build configuration will fail with "failed to start" error without running.

Run build on the same agent

When enabled, and B snapshot-depends on A, then builds of B are run on the same agent, that build of A from the same build chain was run on.

Suitable Builds

A "suitable" build in terms of snapshot dependencies is the one which uses the same sources snapshot. If the build configurations have the same VCS settings, this basically means the one with the same sources revisions. If VCS settings are different (VCS roots or checkout rules), then "same sources snapshot" revisions means revisions corresponding one to each other in terms of being current at some moment in time.

Please note that custom builds (those run with custom parameters) or personal builds are not considered "suitable" even when they use the same sources revision.

See also a note on certain VCS settings which might result in builds being not suitable, even though they have no changes.

Last modified: 20 April 2023