3

I want to make a build configuration that deploys to our dev server and runs every test (fast and short).

I have a build configuration for doing a production deploy (no tests) but I want to modify it so the production deploy first triggers a dev deploy with tests and then it continues onto production deploy.

I dont want to put dev deploy/testing inside the production configuration, i want it to trigger another configuration and cancel if that configuration fails.

Can this be done?

LearningJrDev
  • 911
  • 2
  • 8
  • 27

1 Answers1

5

Yes - What you require is a snapshot dependency between the production deploy build configuration and the dev deploy configuration.

Here we have a similar setup - we want to Release To Development before we Deploy To Test.

enter image description here

In order for this to happen when we click run on Deploy To Test we setup a snapshot dependency on the previous build configuration

enter image description here

I don't know how you are triggering, but if you click Run on the production config it would cause a dev to build first (production is dependent on dev being run)

TeamCity documentation - Snapshot Dependencies

If you wanted the behaviour to work the other way round, you could add a finish build trigger on the production configuration - this could fire when the dev configuration finishes.

Hope this helps

Matt
  • 3,684
  • 1
  • 17
  • 19