1

We have multiple projects [in different folders] with in a stash repository and we want to checkout only one project [if there are changes] at a time. is this configuration possible through VCS settings? below is an overview

MAIN-STASH-REPOSITORY
-- project_1
-- project_2
-- project_3
-- project_4

when there are changes in 'project_1' we want just 'project_1' to be checkout to output folder [checkout directory]

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
mahesh
  • 109
  • 1
  • 9

1 Answers1

1

If I understand correctly, it sounds like you want to make use of VCS checkout rules (TeamCity v9 link). And also I assume you have a build configuration specific for each project_x in your repository.

On the VCS root in your build configuration, click 'View checkout rules' and enter something along the lines of:

+:relative/path/to/project_x

If you have a VCS Trigger configured, the trigger will only detect changes scoped to the locations defined by the checkout rules.

SteveChapman
  • 3,051
  • 1
  • 22
  • 37
  • thanks for your reply steve, but do you know is it possible to configure more than one check out rule in same build ? so that there will be one build and if we have changes in 'project1' then project1 will be checkout to output directory or if we have changes in 'project2' then project2 will be checkout to output directory – mahesh Mar 03 '16 at 10:35
  • I'm not sure what you're trying to achieve with this, but yes, multiple checkout rules can be specified to identify parts of a repository that should be present in the working directory when changes are detected. Note that for ALL builds (regardless of whether the change was made to project_1 or project_2) all locations satisfying the checkout rules will be present in the working directory during the build, not either / or. If you want either / or, you'll need to use a different build configuration, which sounds more suited to building different projects anyway. – SteveChapman Mar 04 '16 at 08:21