1
votes

We have a TeamCity build configuration which does a deploy and then runs integration tests.

  • Deploy system
  • Run test suite A
  • Run test suite B
  • Run test suite C

If test suite A fails, B and C should still be run (likewise C should run if B fails). To satisfy this, the build steps are set to run "Even if some of the previous steps failed". However, I don't want any of the tests to run if the first step to deploy the system fails.

Is there a way of terminating the build if the deployment fails, but to keep running all tests of there are individual tests which fail?

1

1 Answers

2
votes

You could chain the builds together so have a build for 'Deploy the system' and then have a separate build for 'Run the tests' which has your 3 steps A,B and C in it. The second build takes a snapshot dependency on the first build which means that it will kick off when the 'Deploy' build has completed, but it won't kick off if the build fails.

The steps in the second build could then be set to run even if the previous steps fail as you have it now and they would all run.