-
New Feature
-
Resolution: Unresolved
-
Minor
-
None
-
Jenkins ver. 2.176.3
on Ubuntu Bionic Beaver
We have a number of Swarm instances running on Windows machines, and having some ability for the Master Jenkins server to score which agent to use based on details like:
- Is the Agent connected to Ethernet or WiFi (score Ethernet as preferred)
- Is the User Interface locked (primary user is not utilizing the machine)
- Other metrics that may fluctuate ie
- Load
- Disk space available
- On corporate LAN (not VPN)
At first glance this doesn't problem seem specific to Swarm agents. Regardless of how an agent is attached to the master (be it through SSH, Swarm, Azure Container Agents, etc.) there exists the problem of how to map a build to an agent. Jenkins traditionally offers labels for this purpose, which are fairly flexible but don't include the features you described above. Doing some preliminary searching I see some plugins that claim to offer generic load balancing support, but some of them haven't been updated in years and I haven't tried any of them personally. Ultimately this might be a better question for the users list. If nobody there can suggest an existing plugin that meets your needs, it might be possible to write your own plugin (perhaps based on one of the two I linked above) that does.