lorenzo.urbini
lorenzo.urbini

Reputation: 113

Hook build step in Teamcity

My build project have 3 steps: -file preparation -deployment -functional tests

I have set all the dependencies between them, but I really wish also to hook the deployment step to the functional test, so that if the functional test are running and new code is committed the deployment wait till the functional tests finish.

I know there are the build triggering, the dependencies and the artifact dependencies but each of them doesn't seem good for my case.

The first run a deployment every time the functional test step finish and obviously is not what I want. The second force the deployment to use the same code as in the functional test instead it should use new freshly committed code and for the third is more or less the same situation.

Where I'm thinking wrong? I'm missing something or there's a shortcut to use to make this working?

Upvotes: 1

Views: 582

Answers (1)

Vlad
Vlad

Reputation: 703

You can create 2 build configurations:

  • "Functional tests" configuration with VCS trigger.
  • "Deployment" configuration with snapshot dependency on first configuration and also VCS trigger (or other trigger, e.g. Schedule trigger with 'Trigger build only if there are pending changes' option selected).

Files will be deployed only if functional tests not failed on same code base.

It is what you need?

Upvotes: 1

Related Questions