We have builds that run on dynamic slaves (ec2 instances on AWS). The nodes that the builds run on are currently static. This means that the same instance type is used every time each of these builds run. We would like to make this more dynamic. For example, when the build runs at night we would choose to use a cheaper (and slower) instance type.
It occurred to me that a combination of the plugins dynamicparameter and nodelabelparameter could achieve this requirement. This would result in a build parameter that specifies the default node/label that the build will run on. The default value would be determined by running a supplied groovy script (on master) when the build is triggered.
I don't know if this is in scope for either plugin, or if there is a better way to achieve what I am trying to do. Will be happy to hear suggestions.