Using cloud agent profile name as agent requirement
Hey,
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 os.name 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 os.name 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
Please sign in to leave a comment.
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 buildAgent.properties file explicitly.
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.