0
votes

We have TeamCity with several agents and some agents run on employee's/programmers computer. If the employee shutdown computer in the evening, the running build is mark as failed and email notification is sent. Is is possible in the case of shutdown, to mark the build as cancelled and choose different agent and run the build again on different agent?

2
simple solution - dont run TeamCity builds on people's laptops. altering the build history isnt a good idea .. there is no need to find workarounds for bad practicesNimrod007
We run not only build, even some quality test, which runs for hours. We don't have enough enough unoccupied servers to use, but we have plenty of user stations.Tomas Kubes
In book "How we test in Microsoft", you can read that even Microsoft run test on user stations. But I am not sue, if they switch it off.Tomas Kubes
its a common practice that before the developer pushed the code he will run all the tests locally on his station, but the build system isnt supposed to have nodes on developers stations.Nimrod007

2 Answers

1
votes

I guess if the computer is shutdown while TeamCity build is running, it [build] will be marked as failed anyway. So the question is how to rerun build after failure on new machine.

You can create agent pools and assign several build agents to the pool. After that you should edit 'Agent requirements' setting in build configuration, so your build can be run on any alive machine.

You can use 'Retry build trigger' in trigger sections to rerun your build after failure. It will rerun all failed builds, but it is OK for your problem