I’m trying to set up a set of build configurations in TeamCity 6 and I’m trying to determine as precisely as possible the specific requirement that TeamCity can include.
I have a set of acceptance tests (about 4-8 sets of tests grouped by the functional area of the system to which they belong) that I want to run in parallel (I will model them as assembly configurations so that they can be distributed across many agents).
From my initial research, it seems that with the meta-build configuration AcceptanceTests , which pulls Acceptance tests into a set of individual test configurations through Delays from the snapshot, should do the trick. Then all I have to do is say that my Commit build configuration should run AcceptanceTests and they will all be pulled in. So let's say I also have AcceptanceSuiteA , AcceptanceSuiteB and AcceptanceSuiteC
So far so good (I know that I could also rotate it in a different way and cause Commit config AcceptanceSuiteA , AcceptanceSuiteB and AcceptanceSuiteC to run - the problem is that I need to manually aggregate the results to determine the overall success of the acceptance tests in general) .
The complicating bit is that although AcceptanceSuiteC just needs some Commit artifacts and can then live on it, AcceptanceSuiteA and AcceptanceSuiteB need:
DeploySite (let's say it takes 2 minutes and I cannot afford to completely isolate just this run)- Run tests with deployed site
The problem is that I should be able to ensure that:
- website is configured only once
- The website is not reset while two sets work.
If I configured DeploySite as an assembly configuration and had AcceptanceSuiteA and AcceptanceSuiteB , pull it out as a snapshot dependency, AFAICT:
- subsequent or parallel launch of
AcceptanceSuiteB may initiate another DeploySite that will compress the deployment that AcceptanceSuiteA and / or AcceptanceSuiteB are in the middle of use.
While I can tell you to limit the number of assemblies running at the same time to make only one thing happen at a time, I need to have one at a time and until the dependency parts are still running.
Is there a way in TeamCity to model such a hierarchy?
EDIT: Ideas: -
The solution to crap is that DeploySite can set the “use flag” token, and then reset AcceptanceTests so that the flag [after AcceptanceSuiteA and AcceptanceSuiteB complete]. Then the problem becomes one of the next DeploySite queues down the pipeline until this shutter is opened again (Waiting for a lock inside the assembly does not seem correct - I want it to be marked as “not yet running”, but not like that it takes a long time to do something). However, this kind of flag is here and this bit checks that it is a kind of flaky / peeling odor that I am trying to escape from.
EDIT 2: if I could programmatically change the configuration of the agent, I could set Agent Requirements to require InUse = false, and then set a flag when deployment starts and clears after tests are run