Dependency Triggers, multiple Agents

Hi

I have the following setup:

Project Common
Project A
Project B

Both Project A and B depend on Project Common. The directory structure is as follows:

My Project
/- Project A
/- bin
/- Project B
/- bin
/- Project Common
/- bin

Project A and B reference an assembly in ../Project Common/bin.

We have found that this is the best way to keep our project's self-contained, we use svn: externals to bring in external projects as dependencies.

We have set up a Dependency Trigger so that when Project Common is built then it triggers a build of Project A and B.

Our checkout settings are as follows: Automatically on Agent and a blank checkout directory.

So, when Project Common builds then it starts the build of Project A. But the problem is that Project A is considered a completely fresh build, so it cannot reference the previously built Project Common assemblies. For example:

Project Common builds to C:\Program Files\TeamCity\eefbdc179805b02e\ProjectCommon\bin

Project A builds to C:\Program Files\TeamCity\a5080f812a9a9dbd\ProjectA

So you can see when Project A goes to reference ..\TestAssemblyCommon\bin it won't find it as it hasn't been built in that configuration!

The way I can see to workaround this problem is for our NANT scripts to always build Common when building A and B.... even though this would be a waste of time.

What would be really nice to see would be to consider Dependency Triggers under a single transaction, that don't either clear the directories or create a different working dir.

I understand that this is not in TC at the moment, but wondered if other people could see the benefit in this and that it could be considered for future releases?

Note: I hope I've managed to explain this situation correctly, if I haven't then let me know where I can make it clearer. Thanks!

2 comments

Duncan,

Seems, you might try to use artifact dependencies of A and B to Common to get the assemblies and put them in the place where the build expects them.

Since build A can go to different agent then was used to build Common, simple directories referencing does not seem a good enough solution.

The general problem here is that usually some checkins can go into both A and Common and A should be built with the version of Common that used the same sources' revision. This is currently not possible in TeamCity, but we are working on such source-dependencies right now (e.g. see my description of the feature in this thread).s

--
Best regards,

Yegor Yarko
Project Manager
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Thanks, I tried this and it was exactly what I was looking for!

0

Please sign in to leave a comment.