1

I have a VCS root added to the template and the template is in the main project.

My project hierarchy looks something like this:

MAIN-PROJ --> SUB-PROJ1 --> SUB-SUB-PROJ1.......PROJN
          --> SUB-PROJ2 --> SUB2-SUB_PROJ1.......PROJN

MAIN-PROJ contains my configuration template and I have added a VCS root to it. I don't want to use the VCS root in SUB-PROJ2 and it's sub projects.

How to achieve that?

ANIL
  • 2,542
  • 4
  • 25
  • 44

2 Answers2

0

You can put your VCS rules to the parameter and later each sub-project can redefine it as needed:

The parameters can be defined at different levels (in order of precedence):

  • in a specific build (via Run Custom Build dialog)
  • Build Configuration settings (the Build Parameters page of Build Configuration settings) or Build Configuration Template
  • Project settings (the Parameters page of the Project settings). These affect all the Build Configurations and Templates found in the project and its subprojects.
  • Agent (/conf/buildAgent.properties file on agent)
grundic
  • 4,641
  • 3
  • 31
  • 47
0

You cannot override VCS Root in TeamCity. That is possible just for properties. You can exclude VCS Root from the template and instead add it just for those builds that really need it. That will be also logically correct since having VCS Root in the template makes little sense if not all implementations of this template use it.

You won't have duplication since you reuse the same VCS Root in all builds that need it.

nickolay.laptev
  • 2,253
  • 1
  • 21
  • 31