0

i'm using teamcity v8.1.5. i read online somewhere i thought vcs roots are checked out based on the order that they are listed in the version control settings but that is not the case.

e.g. version control settings have vcs roots listed as:

a

b

c

when i run the build config, the build log displays checkouts as:

c

b

a

i then detach a, re-attach it back, so then the list becomes

b

c

a

but running another clean checkout still results in the original order

c

b

a

is there some internal logic that determines the order of vcs roots checkouts and how to configure that order?

thanks

Why I need this

I work in an environment where there are multiple projects repos such that one project requires the source of another (checked out into the same dir) to build. The complicating part is that certain files with same path/name exist in both repos and in some cases the project would use its own, and in another, it needs the other repo's (thus defining specific order whether to replace the checked out file or not on the second repo checkout). The overlapping file is not actual source code, but build/config file so it doesn't make sense to rename them different.

I know very well that this is not a good practice, but this is what i'm inherited and the priority is to get them to build before refactoring the source structure.

Workaround

I am working around this problem for now by refining checkout rules of the last vcs checkout to ignore the specific files so it doesn't replace the files when i don't want it to. It would still be helpful to simply control this by the order of vcs checkouts.

thanks

Zoe
  • 23,712
  • 16
  • 99
  • 132
Scott Chang
  • 181
  • 2
  • 11
  • There is no gurantees about order of checkout. Could you please give more information on why would you need a specific order? – Nikita Skvortsov Nov 21 '15 at 13:14
  • "i read online somewhere" - you may have misread; it would be good to have the link and see what the author may have meant. – sferencik Nov 23 '15 at 09:55
  • i edited my question about why i need this and my current workaround. @sferencik: sorry i don't have actual link, it was just something i read a while ago when it wasn't a need at the time so i didn't bother saving it. it may have been a misread or incorrect impression, reworded my original comments – Scott Chang Nov 23 '15 at 18:31
  • I think your workaround is sound. I doubt you can find a better solution. – sferencik Nov 24 '15 at 08:03

1 Answers1

0

I'd use checkout rules, so each repo is self contained in its own folder without any chance for overlapping contents with the other repos.

For repo A VCS Root:

+:. => A

For repo B VCS Root:

+:. => B

For repo C VCS Root:

+:. => C

Which becomes:

%system.teamcity.build.checkoutDir%/A

%system.teamcity.build.checkoutDir%/B

%system.teamcity.build.checkoutDir%/C

donhector
  • 818
  • 9
  • 21