General Question - building queue of tasks


I have a general question regarding TeamCity functionality:

I would like to know if it's possible to create a build process queue that will be executed over the agents pool according to their number of processors.


Let's say that I have a script that is getting 1 parameter (file name from the build queue) and copying it to some FTP server.

Script is:
cp FILENAME /ftpserver/storage


I have 3 agents connected to my server, A (8 processors) , B  (8 processors) , C  (12 processors).
and list of 100 files that should be copied to the FTP using the A, B, C agents.
each agent can run the copy script X times according to it's processors number in paralel.

I would like to set the TeamCity build project to manage this build process according to the list of files and the next available processor:
first run will be:
A - 8 copies, B - 8 copies, C - 12 copies. (total 28 out of the 100 files from the list)

and when one of the agent's processors will finish their copying job the build will sent it the next file (29..) and so on.

So basicly it will be like have a queque holding 100 files and 8 + 8 + 12 = 28 virtual agents over 3 physical agents.

Is this configuration possible using the TeamCity product?

Thanks a lot,

Please sign in to leave a comment.