2
votes

There is a requirement in our CI set up( We are using Jenkins as CI ), where in we need to lock the slave for a particular time until a particular or high priority job finishes on Jenkins. This is to ensure that no other jobs should run on this slave. Once the Job starts execution then it needs to be ensured that no other jobs should run on that slave? Do we have any Jenkins plugins that can help us to lock the slave if a job is running and then release the slave node to be used by other jobs once the job finishes(fail or success).?

1
There is no such plugin (that I know of) on Jenkins that does what you want. It's a bad idea to associate one job to a particular slave because it's not scale, and it's also a single point of failure (what if that slave is dead.)Ekk
The requirement is that in case we get a deploy build(priority) that needs to be run on a particular slave then since the number of executors allocated on that slave can be more than one, then the other jobs will also run on that slave and which should not happen.drsdarpan

1 Answers

2
votes

use Heavy Job Plugin https://wiki.jenkins-ci.org/display/JENKINS/Heavy+Job+Plugin and set the job weight equal the number of executors on your slave. Then no other job can run on this slave.