There are instructions at the following page for getting jenkins to start
in maintenance mode:

https://wiki.jenkins-ci.org/display/JENKINS/Post-initialization+script


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



On Mon, Feb 24, 2014 at 9:28 PM, Bruno Meneguello <[email protected]>wrote:

> I do agree. Jenkins should stay in the maintenance mode until requested to
> cancel by an administrator
> Em 24/02/2014 18:23, "Michael Rumpf" <[email protected]> escreveu:
>
> 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
>>
>>
>>  --
>> 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 [email protected].
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>  --
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to