binarygiant
binarygiant

Reputation: 6422

Team City Build Fails when "the build process exit code is not zero" Is Unchecked

I have several build steps that need to run regardless of (test failure, in this case).

However when tests in one step fail, the whole build fails and quits. To overcome this problem I unchecked the "build process exit code is not zero".

After this the build fails more quickly at step 2, which is install of grunt-cli

Is there a (better) way to have my build continue, even on a non-zero exit from a previous step? I tried muting, but this is not what I was hoping for.

TeamCity Enterprise 9.1.7 (build 37573)

Failure Conditions

This only happens when "the build process exit code is not zero" is unchecked

Upvotes: 2

Views: 1908

Answers (2)

JCox
JCox

Reputation: 11

If this is a commandline build step, you can add "exit 0" to force the exit code to always be 0. Since you are reporting tests, you will still see the failed tests in TeamCity.

Upvotes: 1

Didier Aupest
Didier Aupest

Reputation: 3367

When you configure the build stteps, you can set an execution condition of Execution policy to: Even if some of previous steps failed

You can also set to: Always, even if build stop command was issued if you want to do some cleanup on your agent after the execution of your tests.

Upvotes: 0

Related Questions