Git Pending change on nested projects

We are in the process of migrating our projects from Subversion to Git.

While most of our projects are in the format 1 repository = 1 compilation unit / Teamcity Project, some use nested projects inside a repository.

Exemple:

Git_Repository

  • /ProjectA/pom.xml
  • /ProjectB/pom.xml
  • /ProjectC/pom.xml

I looked at the documentation and a few posts here and setup my project like this:

  • Each project share a similar VCS Root which checkout on agent.
  • Each project have their own Branch Specification. Ex: +:refs/heads/master/ProjectA
  • The maven trigger use the project folder in the pom.xml resolution and working directory.
  • The VCS Trigger use the project path in the Trigger rules. Ex: +:ProjectA/**

With this setup, each project build using their project directory and are triggered, with either the VCS trigger or the Hook when a file in their sub-folders is changed.

 

However, since they share the same VCS Root path, when a project is modified, ALL siblings are also flagged with pending changes. And they accumulate until the project is compiled.

I saw some post mentioning using Checkout Rules, but it is not supported with agent-side checkout and those post were left unanswered.

 

Is there a way to have Teamcity not display pending changes that are not inside the "Branch Specification" or the "Trigger rules" ?

 

 

 

0
1 comment

Hi Phillippe,

Checkout rules are supported with agent side checkout, just not optimal in some situations. For your scenario, they're the best option to take, as it will avoid the other roots from having access to the files and thus won't display those as having pending changes.

0

Please sign in to leave a comment.