Start into maintenance mode

3,628 views
Skip to first unread message

Michael Rumpf

unread,
Feb 24, 2014, 4:23:47 PM2/24/14
to jenkin...@googlegroups.com
Hi,

the usual way to restart Jenkins for maintenance is to activate "Prepare for shutdown", to wait until all running tasks are completed and restart Jenkins.
In the past we had many situations where we needed a second restart but because Jenkins starts looking for SCM changes right after the start a new set of builds are already running.

It would be of great benefit to have a flag which starts Jenkins right into "Prepare for shutdown" mode so that no new builds start running.

The easiest part would be to look for a certain file, e.g. jenkins.maintenance, if that is present, Jenkins goes into maintenance mode. When the file is deleted, Jenkins goes back to normal mode.

How do you think about such a feature?

Kind regards,
     Michael


Bruno Meneguello

unread,
Feb 24, 2014, 4:28:34 PM2/24/14
to Jenkins CI - Developers

I do agree. Jenkins should stay in the maintenance mode until requested to cancel by an administrator

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Geoff Cummings

unread,
Feb 24, 2014, 4:48:45 PM2/24/14
to jenkin...@googlegroups.com
There are instructions at the following page for getting jenkins to start in maintenance mode:



You can create a Groovy script file as $JENKINS_HOME/init.groovy
With the following contents:


import jenkins.model.*;

// start in the state that doesn't do any build.
Jenkins.instance.doQuietDown();



On a related note, I would like to be able to manually trigger and allow some maintenance jobs to run when Jenkins is in maintenance mode...

Hope this helps,
Geoff

Jesse Glick

unread,
Feb 24, 2014, 5:00:15 PM2/24/14
to jenkin...@googlegroups.com
On Mon, Feb 24, 2014 at 4:23 PM, Michael Rumpf <michae...@gmail.com> wrote:
> It would be of great benefit to have a flag which starts Jenkins right into
> "Prepare for shutdown" mode so that no new builds start running.

FYI, there is a proprietary plugin in Jenkins Enterprise by CloudBees
for this purpose.

Michael Rumpf

unread,
Feb 24, 2014, 5:05:43 PM2/24/14
to jenkin...@googlegroups.com
Thanks for the hint, this will definitely be of help for our purpose.

Michael Rumpf

unread,
Feb 24, 2014, 5:12:28 PM2/24/14
to jenkin...@googlegroups.com
I find no trace of it on the Cloudbees page:

However, I will download a trial version and have a look.

Thanks,
     Michael

Daniel Beck

unread,
Feb 24, 2014, 9:13:18 PM2/24/14
to jenkin...@googlegroups.com
That page is incomplete.

Use http://release-notes.cloudbees.com/ for the complete reference (it's the "CloudBees Quiet Start Plugin").

On 24.02.2014, at 23:12, Michael Rumpf <michae...@gmail.com> wrote:

> http://www.cloudbees.com/jenkins-enterprise-by-cloudbees-available-plugins.cb
>

Reply all
Reply to author
Forward
0 new messages