After some more tests it looks like the problem affects pipeline jobs but not freestyle jobs. I guess this is a bug so have raised a jira https://issues.jenkins-ci.org/browse/JENKINS-41085
On Wednesday, 11 January 2017 09:59:46 UTC, Joe wrote: > > > Hi all, > > I want to run some scripts externally that require that all jobs are > stopped. > > I expected the following command to stop new jobs being started, and only > return once all the jobs in the queue have finished (or reached the end of > a stage for pipeline and paused): > java -jar jenkins-cli.jar -s IP quiet-down -block > The command does stop new jobs from been started and shows a red banner on > the web interface, but the command returns straight away, even when a job > is still running. > Have I misunderstood the "block" option? > > At the end of the script I was then planning to use: > java -jar jenkins-cli.jar -s IP cancel-quiet-down > This always removes the red banner from the web UI but sometime the job > queue does not restart. > > Using Jenkins version 2.19.4 on Windows 7 running as a service. > > Is there another way to achieve this? > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5203289b-484c-4de7-9167-b51a0387f62e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
