Separate CI triggers in Teamcity for solutions with shared projects
Note: I've also asked this question on stackoverflow
I'm trying to solve a problem in teamcity. Lets start with an example project structure:
Root (folder)
Common (folder)
Common.csproj (file, referenced from ProjectA.sln & ProjectA.csproj as well as ProjectB.sln & ProjectB.csproj)
Common.cs (file, referenced from Common.csproj)
Readme.txt (file, not included in any project or solution)
Project A (folder)
ProjectA.csproj (file, referenced from ProjectA.sln)
Program.cs (file, referenced from ProjectA.csproj)
Default.aspx (file, referenced from ProjectA.csproj)
ProjectB (folder)
ProjectB.csproj (file, referenced from ProjectB.sln)
Program.cs (file, referenced from ProjectB.csproj)
Now, I would like to know if it's possible to setup a pattern in my build trigger in Teamcity for each of the solutions so that checkins that only affect one solutions doesn't trigger a build of the other solution.
Right now we just have a very general list of ignore patterns such as -:*.txt so that changes of readme files doesn't trigger a build of all solutions.
Please sign in to leave a comment.
Johannes,
You could use VCS trigger rules for your build configurations to avoid build triggering on changeы affecting certain part of VCS root. For example:
BuildConfig1 trigger rules:
+:Common
+:ProjectA
-:ProjectB
BuildConfig2 trigger rules:
+:Common
+:ProjectB
-:ProjectA
You could also try to specify checkout rules for each build configuration to exclude part of VCS root from checkout. In this case, excluded part of VCS root will not be checked out and changes checked in within this part will not trigger the build.
BuildConfig1 VCS checkout rules:
+:Common=>Common
+:ProjectA=>ProjectA
-:ProjectB
BuildConfig1 VCS checkout rules:
+:Common=>Common
+:ProjectB=>ProjectB
-:ProjectA