Note that there are some explanatory texts on larger screens.

plurals
  1. POTeamCity: Managing deployment dependencies for acceptance tests?
    primarykey
    data
    text
    <p>I'm trying to configure a set of build configurations in TeamCity 6 and am trying to model a specific requirement in the cleanest possible manner way enabled by TeamCity.</p> <p>I have a set of acceptance tests (around 4-8 suites of tests grouped by the functional area of the system they pertain to) that I wish to run in parallel (I'll model them as build configurations so they can be distributed across a set of agents).</p> <p>From my initial research, it seems that having a <code>AcceptanceTests</code> meta-build config that pulls in the set of individual Acceptance test configs via <a href="http://confluence.jetbrains.net/display/TCD6/Dependent+Build#DependentBuild-SnapshotDependency" rel="nofollow">Snapshot dependencies</a> should do the trick. Then all I have to do is say that my <code>Commit</code> build config should trigger <code>AcceptanceTests</code> and they'll all get pulled in. So, lets say I also have <code>AcceptanceSuiteA</code>, <code>AcceptanceSuiteB</code> and <code>AcceptanceSuiteC</code></p> <p>So far, so good (I know I could also turn it around the other way and cause the <code>Commit</code> config to trigger <code>AcceptanceSuiteA</code>, <code>AcceptanceSuiteB</code> and <code>AcceptanceSuiteC</code> - problem there is I need to manually aggregate the results to determine the overall success of the acceptance tests as a whole).</p> <p>The complicating bit is that while <code>AcceptanceSuiteC</code> just needs some <code>Commit</code> artifacts and can then live on it's own, <code>AcceptanceSuiteA</code> and <code>AcceptanceSuiteB</code> need to:</p> <ul> <li><code>DeploySite</code> (lets say it takes 2 minutes and I cant afford to spin up a completely isolated one just for this run)</li> <li>Run tests against the deployed site</li> </ul> <p>The problem is that I need to be able to ensure that:</p> <ul> <li>the website only gets configured once</li> <li>The website does not get clobbered while the two suites are running</li> </ul> <p>If I set up <code>DeploySite</code> as a build config and have <code>AcceptanceSuiteA</code> and <code>AcceptanceSuiteB</code> pull it in as a snapshot dependency, AFAICT:</p> <ul> <li>a subsequent or parallel run of <code>AcceptanceSuiteB</code> could trigger another <code>DeploySite</code> which would clobber the deployment that <code>AcceptanceSuiteA</code> and/or <code>AcceptanceSuiteB</code> are in the middle of using.</li> </ul> <p>While I can say <em>Limit the number of simultaneously running builds</em> to force only one to happen at a time, I need to have one at a time <strong>and</strong> not while the dependent pieces are still running.</p> <p>Is there a way in TeamCity to model such a hierarchy?</p> <p>EDIT: Ideas:-</p> <p>A crap solution is that <code>DeploySite</code> could set a 'in use flag' marker and then have the <code>AcceptanceTests</code> config clear that flag [after <code>AcceptanceSuiteA</code> and <code>AcceptanceSuiteB</code> have completed]. The problem then becomes one of having the next <code>DeploySite</code> down the pipeline wait until said gate has been opened again (Doing a blocking wait within the build, doesnt feel right - I want it to be flagged as 'not yet started' rather than looking like it's taking a long time to do something). However this sort of stuff a flag over here and have this bit check it is the sort of mutable state / flakiness smell I'm trying to get away from.</p> <p>EDIT 2: if I could programmatically alter the agent configuration, I could set <a href="http://confluence.jetbrains.net/display/TCD6/Agent+Requirements" rel="nofollow">Agent Requirements</a> to require <em>InUse=false</em> and then set the flag when a deploy starts and clear it after the tests have run</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload