Help with git checkout rules.

Completed

I'm currently on TeamCity Enterprise 2018.2.4 and I'm having a lot of trouble with checkout rules and git.
I have a few directories I'd like to checkout: repo1/dir1, repo1/dir2, and repo2/dir3. I can't figure out how to checkout just those files and map them to a specific folder on the agent, say agent_dir. How do I do this?

Also, I'd like to map all three directories to the same folder. Is this possible? I've read checkout rules aren't as powerful with git.

 

The paths on github look like this:

https://github.cmpny.com/Company/repo1
https://github.cmpny.com/Company/repo1/tree/master/dir1
https://github.cmpny.com/Company/repo1/tree/master/dir2

https://github.cmpny.com/Company/repo2/tree/master/dir3

1 comment
Comment actions Permalink

Hello,

I believe the following setup should be suitable for you:

for the VCS root 1 (pointed to repo1):
+:dir1 => agent_dir
+:dir2 => agent_dir

for the VCS root 2 (pointed to repo2):
+:dir3 => agent_dir

With this setup, agent will collect the contents of these three directories into checkout folder/agent_dir; anything else will be skipped. Please mind that it`s best to confirm prior that there are no file conflicts between these folders content. 
Please find more details regarding the checkout rules usage here: https://www.jetbrains.com/help/teamcity/vcs-checkout-rules.html

0

Please sign in to leave a comment.