开发者

Disable artifact publishing if build fails in TeamCity

My build scenario is like this (simplified):

  1. Compile
  2. Package (*.zip)
  3. Deploy to test environment
  4. Run tests over the environment

If tests fail TeamCity still publishes artifacts. This is unnecessary and consumes disk space. How can i prevent this? Can't find开发者_如何学Go any check box or something (TeamCity 6.5 Enterprise).


As far as I can tell, TeamCity doesn't have a built-in option to disable artifact publishing if the build fails.

However, in the build script called by TeamCity you could try:

  1. Removing artifact paths from the build configuration, and instead emitting the appropriate TeamCity service messages with your artifact paths only when tests are complete and successful.

  2. Only copying files to the artifact paths configured in TeamCity after the tests are complete and successful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜