foresightyj
foresightyj

Reputation: 2106

How can i manually run a build, bypassing its Snapshot Dependencies

Currently I have three builds in my project: Build, Deploy & Test, where Deploy has a snapshot dependency on Build and Test has a snapshot dependency on Deploy.

The Test build hosts a bunch of integration test scripts. Whenever I click the run button beside Test, Build runs but I want to run Test directly, ignoring its depedencies.

enter image description here

The dialog below is the only place I know that might achieve what I want but I tweaked various options and still Build is run every time.

enter image description here

Thanks for any help.

Upvotes: 3

Views: 1391

Answers (1)

Yaegor
Yaegor

Reputation: 1832

Snapshot dependencies in TeamCity are targeted to run builds linked with the dependency on the same sources snapshot. Once you have "Do not run new build if there is a suitable one", dependency will only be rebuilt if there are pending changes in it.

If you want to run Test on previous changes (and test an already finished build of Build on those changes), go that Build's build page and invoke "Promote..." form the Actions in the top right area. There you can run a build of Test and it will use the current build of Build you were invoking the action from.

You can also click on Run's button "..." when running Test, go to Dependencies tab and select already finished build of Build there.

If you find that you usually do not need to run Test on the same sources as Build (e.g. use latest sources in Test and test binaries from the latest available Build), you should be using TeamCity artifacts dependency instead of the snapshot one.

Upvotes: 1

Related Questions