0

I've a repository on GitHub called FruityRepo. Inside FruityRepo I have two Visual Studio solutions, one called Fruit.Apple and another called Fruit.Pear.
I'm configuring TeamCity to build both solutions, so I've created a couple of projects inside TeamCity. I only want TeamCity to pull down the Pear code when Pear changes, and likewise for Apple.
However I'm unsure what the format of the checkout rule needed to make this work. I think I need two rules, something like;

-:.
+:Fruit.Pear

This does not work though, TeamCity returns the error Cannot start build runner.

How do I configure a checkout rule in TeamCity against GitHub?

Stuart Hallows
  • 8,795
  • 5
  • 45
  • 57

2 Answers2

3

In Git you can only git fetch a whole repository. git pull is essentially git fetch followed by git merge. So you cannot configure such a TeamCity rule.

Look at this question for more information. Theoretically, you can do a git fetch and then checkout a part of the contents of the repository. But you have still fetched the whole repository. So what would be the point?

It sounds to me like what you should do is create two separate repositories, one for each solution.

Community
  • 1
  • 1
Klas Mellbourn
  • 42,571
  • 24
  • 140
  • 158
2

Try using checkout rule like this

+:Fruit.Pear=>.
neverov
  • 1,283
  • 8
  • 11