Re: Stop builds for a period of the day

2015-03-03 Thread Cristian Măgherușan-Stanciu
On Monday, March 2, 2015 at 11:52:29 AM UTC+1, John Carbasse wrote: Hello, Is it possible, in Jenkins or by a plugin, to forbid builds for a period (12h-14h for exemple) ? Ideally, I look for a global parameter, I have too many jobs for set it for each. Thanks for your time We did it

Re: Stop builds for a period of the day

2015-03-03 Thread Cristian Măgherușan-Stanciu
After pasting it, I noticed that the Groovy script could use a bit of refactoring to make it a bit cleaner: import jenkins.model.* import hudson.model.* def c = new GregorianCalendar() def hour = c.get(Calendar.HOUR_OF_DAY) def jobPattern = _Deploy_PR* def matchedJobs =

Re: Stop builds for a period of the day

2015-03-02 Thread Scott Evans
Another option if you want to do it programmatically could be to use an API call via url hit to take machines offline, then put them back online. The general format of the call should be available pretty easily with a web search, but we use something like this in a curl call when wanting to take

RE: Stop builds for a period of the day

2015-03-02 Thread Matthew.Webber
Just be aware that jobs that are scheduled to run during that period are still scheduled, and you see them waiting in the Build Queue. Also, be careful if you have slaves configured “take this slave on-line when in demand, and off-line when idle”. If you have a job that Is tied to a particular

Re: Stop builds for a period of the day

2015-03-02 Thread Christopher Orr
Sounds like the Slave Squatter plugin could help: https://wiki.jenkins-ci.org/display/JENKINS/Slave+Squatter+Plugin On 02/03/15 02:52, John Carbasse wrote: Hello, Is it possible, in Jenkins or by a plugin, to forbid builds for a period (12h-14h for exemple) ? Ideally, I look for a global