Teamcity running build steps even when tests fail

后端 未结 5 1118
予麋鹿
予麋鹿 2020-12-16 10:23

I am having problems with Teamcity, where it is proceeding to run build steps even if the previous ones were unsuccessful.

The final step of my Build co

5条回答
  •  隐瞒了意图╮
    2020-12-16 10:59

    Just to prevent confusion, this issue is fixed in Team City v8.x, We don't need those workarounds now.

    You can specify the step execution policy via the Execute step option:

    Only if build status is successful - before starting the step, the build agent requests the build status from the server, and skips the step if the status is failed.

    https://confluence.jetbrains.com/display/TCD8/Configuring+Build+Steps

    Of course you need to fail the build if at least one unit test failed:

    https://confluence.jetbrains.com/display/TCD8/Build+Failure+Conditions

    On the Build Failure Conditions page, the Fail build if area, specify when TeamCity will fail builds:

    at least one test failed: Check this option to mark the build as failed if the build fails at least one test.

提交回复
热议问题