Jump to content

Can't seem to get correct Selector for TeamCity checkout


lethil

Recommended Posts

I'm having problems getting TeamCity to download the right part of my /main branch via Selector.

 

On my repository named "Repo", I'm trying to only download the "/Source" directory from the "/Main" branch.

 

Here's the Selector I'm using:

 

 

repository "Repo"
  path "/Source"
    branch "/main"
      checkout "/main"
 
When I use this Selector, it downloads all of my "/main" branch (as if the path was "/").
 
What am I doing wrong?
 
Thanks!
Link to comment
Share on other sites

Hi!

 

You are using Plastic SCM 4, right? In that case I'm afraid that subpath selectors (like Plastic SCM 3) are not allowed, that's why the update operation is downloading all the tree structure.

 

If you are really interested in avoiding the download of the rest of the repository I think you can use the cloaked.conf feature. Create a "cloaked.conf" file in the root path of your workspace you will be able to filter the paths you are not interested in.

 

This is an example:

 

 

 

#File patterns cloaked by Plastic SCM

# cloak all bin directories
*/bin*
# cloak all files named processes.conf in the workspace
*processes.conf
# cloak all files with extension .suo
*.suo 

# don’t cloak any files named “result”, any extension
!*/result.*
# cloak all files or directories containing “private” 
*private*

Try first with a Plastic SCM workspace, no TeamCity involve here, and then move the "client.conf" file to the TeamCity workspace. (use the "cm lwk" command in order to discover the wks used by TeamCity)

Link to comment
Share on other sites

it looks like the workspace is dynamically generated. There's about 8 of them and a new one seems to be made each time.  I copied over to the user folder of the account running the build agent, but it doesn't seem to have been used.

 

Is there somewhere I can put this cloaked.conf where it'll actually be noticed by cm when the build agent calls it?

 

Also, I notice that $workspace doesn't seem to work in a cloaked.conf.  It's exactly what I need, but since I couldn't get that to work, I had to rename some directories so that the wildcard will only match the directories I need.  Adding $workspace to the cloaked.conf would be very helpful. :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...