How to requeue snapshot dependencies in TeamCity after new items have been added to the build queue with a higher priority?

StackOverflow https://stackoverflow.com/questions/12492745

문제

I have a number of build configurations which are chained together.

A
B
C D E

Each build has a snapshot dependency on the previous configuration in the chain meaning that build B depends on A and builds C, D and E depends on B.

Each configuration has a trigger set up for when the previous build in the chain completes successfully. The problem with this setup is when personal builds are run to test remote changes. If B is running at the point a remote change is added to the queue against A, the personal build will first run A (personal build) and C, D and E will be add the the queue. The reason this is a problem is that C, D and E are tests run against code which is deployed in steps A and B. This means that the code is effectively redeployed with personal changes before the tests are run.

There are two acceptable ways to solve this problem

  1. After running A as a personal build, requeue A to run without these changes before C, D and E
  2. After running A as a personal build, remove C, D and E from the build queue as it is not essential the the tests are run against every commit

I am unable to see how I can implement either of these options. The snapshot dependencies are currently set to "Do not run new build if there is a suitable one", but if I change this it won't be possible to rerun failed tests without going through the whole chain again.

Is this a poor way to configure TeamCity and if so, what would be a better way to structure the build chaining?

도움이 되었습니까?

해결책

I solved the issue by implemented the accepted answer in this question:

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

This solution implemented option 1 from above. By making use of a text file containing the current deployed values, builds could be cancelled/re-triggered over HTTP if the dependency was out of date.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top