Prepopulate work directory

I am working on creating a disk image of an agent and I would like to populate the work directory with a folder during the image creation.  I have a large source directory and would like to only do the initial check out once when the image is created. If I just add the folder Teamcity deletes it when the agent starts.  I tried to copy (and edit) a directoy.map from another agent but that did not prevent the folder from being deleted.  Is what I am trying to do even possible?

0
1 comment

Hi Nathanael,

The work directory is managed by teamcity so prepopulating it is usually a bad idea. This isn't an uncommon scenario, though, the solution is usually to map it to a different, fixed folder within the device and either access it directly, or simply mapping/linking it within the build folder as the first build step. This solution also helps if instead of having it directly on the image you have the files on a network share (very common for large resources), as you can simply map it first, then move on, without having a massive image or a number of agents taking a lot of disk space needlessly.

0

Please sign in to leave a comment.