Problem with Snapshot Dependencies

We're experiencing an issue with Snapshot dependencies, in the following scenario:

Config_1 - Build triggered by VCS update, with exclusions using Trigger Patterns of -:DirectoryName
Config_2 - Build triggered by Config_1, with snapshot dependency on Config_1
Config_3 - Build triggered by Config_1, with snapshot dependency on Config_1

All the triggering and snapshot dependencies work fine, until someone checks something in mid-build.  If the build is in the process of carrying out Config_2, then when it comes to Config_3 it checks the sources of Config_1, which is fair enough.  However, I was expecting that if something had been checked in which was excluded from the initial triggering of Config_1, then Config_1's sources would be valid and it would just jump straight to Config_3.  However, these exclusions appear to be ignored and so if any of the sources are altered then it kicks all of Config_1 again.  Unfortunately, I have about 60 directories excluded for this configuration and the likelihood of something being checked in in one of the excluded directories is very high.  Also, we don't have 3 build configurations, we have almost 20 and we're finding that it's virtually constantly building Config_1, which just happens to take a good half an hour to run!

Is there any way to get it to enforce exclusions for the calculation of whether sources are valid, or do I need to change my VCS root and take out the directories which we don't care about?  I'd prefer not to have to do that, as we have one major repository and it would significantly lengthen our build process.

Alternatively, is there any way to configure it so that once a VCS trigger has gone off that you can then forcibly use that source for other build configurations, without it checking for the source validity on each configuration?  I'd prefer it to run all 20 build configurations through to the end without it doing any more updates.

Hopefully that all made sense...

4 comments
Comment actions Permalink

If you do not care about changes coming to the DirectoryName and this directory is not needed when Config_1 configuration is building then you can add checkout rule to Config_1 and exclude this directory from the checkout. You do not need to use VCS trigger rules in this case. So when next time some one adds a change to DirectoryName you will not see changes in Config_1 and it will not be triggered. If there is no changes then last Config_1 build will be reused (if corresponding options are set for dependencies).

0
Comment actions Permalink

I was under the impression that if you exclude the directories at the VCS level that it checks the entire repository out and then deletes the directories you excluded.  In our case, this would involve checking out almost 4.5GB of data to then delete 3GB every time an update was done.

Has something changed with the way checkout exclusions are handled between Teamcity 3 and 4?

Thanks for the answer anyway!

0
Comment actions Permalink

That was a little hasty - I meant to say that on each update it would re-retrieve the 3GB and then immediately delete it.  It would only retrieve the full repository on a clean checkout!

0
Comment actions Permalink

Unfortunately this is true for agent side checkout. Have you tried to use server side checkout?

0

Please sign in to leave a comment.