How to assign/control which projects build on which agent

Hi All,

I am using teamcity 4.0.1 (server and default agent) on machine A. I have another agent installed on machine B.
I have a 'shared' folder on machine A which contains outputs of many project builds,  'myproject1'  depends on this folder and therefore it should run only on machine A.
Similarly, I can have 'myproject2' which should run only on machine B, as it also contains a 'shared' folder (which are selected outputs of many builds with different compilers than the ones in machine A).
How can i assign a project 'myproject' (Build runner: command line...could technically run on any of the machines A or B), but should run only on machine A or machine X as I choose.
At the moment the project build runs automatically on machine B (though it is a command line runner and could have run on machine A as well). I don't want that, as it's build is not referring to the correct 'shared' folder.

Basically, how can i control where the build runs?

thank you in advance.

shuma

1 comment
Comment actions Permalink

I believe i have figured this out, but if you have some other method, i would like to hear....

As compatibility/incompatibility of an agent for a certain project depends on the specified build runner being available in that machine, that means projects with build runner: command line would build on any machine.

So to control where i wanted the build, I created a system environment variable in all the machines with unique values. And then specified in the project under 'Agent requirement' and use 'Add requirement for a variable' with equals condition to value for the machine i wanted to be built on.
That fixed it.

shuma

0

Please sign in to leave a comment.