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?