Is it possible to run only one Job per Jenkins slave?

Viewed 82

I have configured dynamic slaves on Jenkins to wait for 24 hours before being deleted (debugging purposes), and it works well, but we want the next build for the job to be launched in a different slave and it does not affect the previous one build. I'm using labels to match the slaves.

UPDATE

I found this option when configuring the slave: Maximum Total Uses is the option that I required.

enter image description here

But I would like to disable the slave to run further jobs, without destroying it.

2 Answers

Why not set node max process to 1.

You can change the slave label so that it does not match any jobs. You can also set the slave offline.

Related