gitlab-runner pause, unpause and list-jobs commands
Problem
It would be very helpful from maintenance perspective for gitlab-runner CLI to provide 3 new commands:
-
list-jobs
which would list the jobs currently running on given runner -
pause
which would request that the runner is made inactive, i.e. it's not picking up any new jobs.- optionally (with a command-line flag maybe?), this command could be blocking, i.e. return exit code only once all the existing jobs on the runner have finished and it's not processing any new jobs
unpause
Use cases:
- ensuring a safe upgrade of Gitlab runners (e.g. with Ansible) without the necessity to query/update REST api
- safe shutdown of runners
- ability to perform other maintenance operations directly on the hosts where Gitlab Runner may be running, e.g. OS restart, Docker image cache cleanup, OS reconfiguration
Proposal
{placeholder for proposal. It's possible that we can address some of the use cases with documentation updates, but there are also some additional interesting points in the comment threads to explore from a solution perspective.}
~feature
Edited by Darren Eastman