Using cloud agent profile name as agent requirement


Is it possible to use the cloud agent profile name as an agent requirement?

I have a linux and a Windows profile currently, and agent requirements about containing either 'linux' or 'windows' - that works just fine.

But I am thinking of introducing a new kind of linux agent with more powerful hardware. I want only certain builds to use that profile, and other builds to use the more powerful configuration.

I _do not_ want ot stipulate that the contains 'linux' and and the aws instance type is a certain size, because it might change in future, and I do not want to have to go all around the place to edit it again.

- Lasse

Comment actions Permalink

Hi Lasse

Agent declares teamcity.agent.hardware.memorySizeMb and teamcity.agent.hardware.cpuCount configuration parameters.
You can use those, or declare your own parameters by putting them into file explicitly.

Comment actions Permalink

Thanks, we ended up using cloud profile id which can be found in the url for the cloud profile - I hope they are stable :)

I think you should consider exposing the name also, that would be more descriptive.


Please sign in to leave a comment.