Is it possible to prevent a build chain from being interrupted in TeamCity?

こ雲淡風輕ζ 提交于 2019-12-01 22:54:35

Here's what I'm gathering:

  • A and B should be considered mutually exclusive.
  • A should always have a lower build priority than B, but
  • Once started, A should not be interrupted.

There may be a way to fight TeamCity on this; I don't know. If you're open to changing your process a bit, one of these might work for you :

  1. Clone your environment such that A and B can be deployed to different targets. This would allow them run completely independently of one another. Use multiple build agents (at least one each for A and B) to allow the faster, higher priority B to execute at the same time as the slower, lower priority A. (This, I think, would be a significant perk.)
  2. Make your process more atomic. Merge the various build/deploy/test pieces into a single configuration, thus ensuring that pending portions of the A build chain can't be displaced by B.
psych

I solved the problem by making both 'build & deploy' build configurations write a text file to the deployment folder containing the build type and build number. All tests compare the values in the text file to the current builds snapshot dependencies. If they values are different, re-trigger the build (forcing dependencies to be rebuilt) and then cancel the current build.

Cancel build by calling:

http://teamcity.jetbrains.com/guestAuth/ajax.html?comment=<CommentMessage>&submit=Stop&buildId=<BuildId>&kill

How to trigger build with dependencies set to rebuild:

Is it possible to force a TeamCity build to rebuild dependencies when triggered over HTTP?

This means that when a test is running out of step, the deployment will be re-triggered and then the tests will run.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!