How do I stop builds on slaves to prepare for routine Jenkins maintenance?

Issue

  • Besides the “Safe Restart” plugin, is there a way to stop Jenkins slaves from building in cases where you would like to upgrade JOC/JE-masters?
  • Do I have to stop all the slave nodes one at a time and then bring things up in a controlled manner?
  • Is there a way to stop Jenkins from executing any new jobs?

Environment

CloudBees Jenkins Enterprise

Resolution

  1. The safeRestart function is actually in Jenkins core (just navigate to /safeRestart); this will prevent any new builds from starting and will allow existing builds to complete. The “Safe Restart” plugin just adds a button for this. 

  2. There is also the /quietDown functionality - which will have Jenkins stop taking on new builds but will not trigger the restart.

  3. Finally, CloudBees Jenkins Enterprise also has a Quiet Start function, which will allow you to restart Jenkins, essentially in the Quiet Mode (ie: running but not accepting new builds). Docs on this feature are here: https://go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide/chapter-quiet-start.html#quiet-start

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.