Reputation: 1
I am using TeamCity to run around 15 different test suites consisting of hundreds of test cases whenever any new changes come in the existing project. It is configured in a way that it checks for any new changes in Git every half an hour and if it finds any changes, it starts building the project even in the middle of running the test suites. As a result, the database is getting outdated and the test cases are failing for the wrong reasons. How can I configure it so that if TeamCity is in the middle of running the test suites and if any changes come before it can finish running all the available test suites it will not start building the project. It will wait until all the test suites are run and then start building the project with the latest changes. Please help me out.
Upvotes: 0
Views: 73
Reputation: 374
You may use a Resource Locker with a quota of 1.
Create the Locker at project level (a project both your builds are a part of). For the example I named it ServiceLocker
.
Then, in both builds (Tests
and Build project
), add the Resource Locker you created.
As a result, when coming to the top of the build queue, both the builds will :
In other words, it prevents the builds having this Locker to run simultaneously.
Upvotes: 1