Reputation: 556
We have one particular build machine that we would like a Jenkins job to always use.
However, if this machine is not available for some reason, we would like it to use a backup machine/s.
I presumed that using the 'or' syntax in the label would achieve that goal, but it seems this is not what it was intended for.
For example, I have a machine called 'windows-01'. This is the machine I always want the job to run against unless it's offline. If offline, I'd like it to use the label 'BACKUP_MACHINES'. I was hoping I could do something like:
windows-01||BACKUP_MACHINES
Unfortunately, this doesn't work, it will still randomly select a machine. Does anyone aware of solutions or know of plugins for such a scenario?
Upvotes: 2
Views: 1471
Reputation: 6458
Use priority sorter plugin or similar alternatives (e.g. Scoring Load Banancer plugin).
Upvotes: 1