I have a Jenkins master setup with several slaves in our primary data center and one slave in our DR/BC (disaster recovery/business continuity) data center.
I would like jobs to run on the DR slave regularly to ensure it stays up to date with the required software and doesn’t get stale, but since our DR center is geographically distant from the resources used in the builds & tests (SAN, DB, etc.) jobs take 4x – 10x longer to run. This is fine for a DR scenario, but painful for everyday life.
It appears that Jenkins sorts the slaves alphabetically for selecting which to run a job on, which is unfortunate because our machine naming convention is based on datacenter location, and the DR slave is always picked first.
Is there a way to specify how Jenkins picks a slave? or a way to specify a “cost” (like a routing cost) of a slave, so that it will be picked less often?
The solution I have settled on:
This will force the DR slave to come online, and run random jobs several times which should show if that slave has fallen behind in any required software, patches, etc.