I have a master and two slaves. When i want a job to run on both the salves i put in this expression in the Restrict where this project can be run option
linux && linux2
I have labelled the nodes correctly. But then the jobs dont run on any machines. I get an error such as Theres no slave/cloud that matches this assignment
and the the job is still pending saying it cannot find a label matching the expression. Whats wrong? How can i make it run on both slaves. I do not want to use any other plugin.
Your expression says that a machine must have two labels: linux
and linux2
.
You most likely want to say linux
or linux2
, which would be linux || linux2
.
That would mean, when you start a build, that it runs on either one of those two machines.
If you want the build to occur on both machines when you start a build, you could install the Node Label Parameter plugin, mark your job as "This project is parameterized", add a "Node" parameter, choosing linux
and linux2
under "Default nodes", and then choose "Execute concurrent builds if necessary", so that builds can happen on both machines at the same time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With