Cause a step to stop the build if it fails

Hi,

I have the following build configuration in TeamCity for a rails project:

  1. bundle install
  2. rake db:migrate
  3. start rails server
  4. Run functional tests in Chrome
  5. Run functional tests in Firefox
  6. Run functional tests in IE


The last 3 steps (4-6) are independent, so if one of them fails the teamcity should continue to run the others.
However if one of the first 3 steps fail (1-3) then the build should stop and not attempt to run any of the later steps.

In the execute step configuration for each step, I have the following options:

  • Only if all previous steps were successful - this as I mentioned is not good for me since if functional tests for Firefox fail I still want the CI to run the functional tests in IE
  • Even if some of the previous steps failed - this is also not good for me because I don't want to run functional tests if the db:migrate step failed.
  • Always run step - unrelevant.


What I would like is to specify that if step number 3 fail, then the build should not continue any of the later steps regardless of their execute step policy.

Is there any way to achieve that, or some other means to make the last 3 steps independent?

Thanks in advance,
Ido Feins

Please sign in to leave a comment.