VCS trigger rules not working correctly - false positives & false negatives
I have multiple build jobs that all use the same git repo. Each one builds a different part of the repo, so I have each one set to have VCS trigger rules on specific directories in the repo. I want a specific commit to only trigger **some** of my build configs, depending on which directory that commit's file changes were in. I also have one directory that triggers jobs in two builds; ie. the two jobs share a monitored directory. So the desired behaviour is this:
'buildA' is triggered with every commit that changes any file within the 'dirA' and/or 'dirB' directories of my git repo
'buildB' is triggered with every commit that changes any file within the 'dirB' directory of my git repo
'buildC' is triggered with every commit that changes any file within the 'dirC' directory of my git repo
So any change to a file in dirA triggers buildA, any change to a file in dirB triggers buildA & buildB, and any change in dirC triggers buildC.
I'm trying to get this done with VCS triggers rules:
-Build A has VCS trigger rules set to:
+:dirA/**
+:dirB/**
-Build B has VCS trigger rules set to:
+:dirB/**
-Build C has VCS trigger rules set to:
+:dirC/**
From everything I've read in the documentation and issue tracking, this sort of set up with Git should work, except in the case of merge commits, because TeamCity has an issue where git merge commits always trigger everything (https://youtrack.jetbrains.com/oauth?state=%2Fissue%2FTW-24747).. however, I'm getting numerous cases where my trigger rules aren't being respected that can't be explained by that issue.
I have other false positives where commits other than merge commits trigger builds where they shouldn't (for example, a non-merge commit changing only something in dirC triggered all three builds, even though my rules specify that it should only trigger buildC).
I also have false negatives as well, where sometimes, a change won't trigger any builds at all--for example, a change in dirC didn't trigger any builds at all.
I've also seen **both** happen: once, there was a change in dirA which did not trigger buildA like it was supposed to, but instead it triggered buildC.
Please sign in to leave a comment.
I've been unable to replicate this behaviour so far. Could you please answer a couple questions so we can try to figure out what's going on?
-What version of TeamCity are you using?
-Could you share some screenshots with the build overview for any of the builds that misbehaved?
-Could you double check that, in the "Changes" tab of the build details, the change that triggered the build didn't include any file that matches the build configuration rules? If you could provide screenshots of this it would also be helpful.