You can specify a groovy expression to be evaluated each time a resource is checked to be appropriate for a build. The expression must result into a boolean value. The following variables are available, in addition to optional arguments of the currently evaluated build:
java.util.List<String>
of labels as per resource configurationFor matrix jobs, axis names and axis values can be referenced as well. Examples:
resourceLabels.contains("hardcoded")
resourceLabels.contains(axisName)
resourceName == axisName
The script's contents need to pass approval by the Script Security Plugin.