We have 5 agents running in its own LXC/Docker container. 3 of them are actually in 'machine A', and the other 2 are also in 'machine B'.
We do not want each machine (A and B) to run too many jobs concurrently. For example, job 1 and 2 can run in machine A and B respectively at the same time, but they should not run in the same machine at the same time.
I tried to achieve this constraint using Shared Resources, but could not figure out how.
- if there's a way to assign a shared resource to an agent, so that I can assign the same shared resource to the agents running on the same machine, or
- if I can acquire a shared resource programmatically, so that I can acquire a certain value such as the agent's system property value (i.e. the machine's name) from a custom shared resource (i.e. the list of the machine names (A and B in this case)).