Choose Pending Changes from Subdirectory

I have a git repository which looks like

In TeamCity I then have a project setup for each of them. NSISInstaller has a dependency on both of the others.

When I change a file in CSharpProject, TeamCity reports - Pending (1) in all.

This is really annoying not only because it's inaccurate, but because if I run NSISInstaller, it causes all three projects to be rebuilt.

I get that in Git you can't just grab a subfolder and you need to get the entire repository. And this doesn't bother me. But, teamcity should allow us to specify a rule to specfy which folders to look at, or to ignore, when deciding if a project has Pending changes.

I'm aware that I can specify in a VCS trigger to trigger only when a file in CSharpProject changes.
But this becomes useless when a dependency is going to cause CPlusPlusProject to build anyway.

I know that people will say the solution for this is "Submodules"
But from what I can see, you give up too much by using submodules.

Comment actions Permalink


Such behavior is desired. Snapshot dependency is configured to have the same revision of all builds in a build chain. Here is a good example of usage.
In your case I would recommend to set up VCS triggers on CSharpProject and CPlusPlusProject and configure a Finish trigger on NSISInstaller build configuration.

Comment actions Permalink

Hi Alina,
Sorry for the late response. That's not what I'm after.
I'm trying to cut down on the number of builds that get triggered. I already have my dependencies setup. The problem is because they are all in the same repository, a change in one project causes TeamCity to think there is a change in all projects. And that means instead of one project rebuilding I get 3 projects rebuilding.

There's a pretty simple solution...
1. Get all the check ins since last build (which you do)
2. Grab the list of files that has changed in each checkin (Which again you do)
3. Check the file list against a delimeter or regex if no matches are found then pretend the check in doesn't exist (THIS IS WHAT YOU'RE MISSING)
4. Continue on as before.

Comment actions Permalink

Hi again,

If I correctly understood you are speaking about VCS checkout rules. Please try to set them up.


Please sign in to leave a comment.