I'd like to recycle and update my VMs that I use for my self-hosted Bitbucket runners on a regular basis. There's no time of day where I can be certain that the runners aren't doing some work on behalf of pipelines in Bitbucket.
That means I can't just blindly shut things down. I need to drain and restart them in a less interruptive way.
Is there a way to tell a docker-based runner to shut itself down after it finishes with whatever current task it happens to be processing?
Hi @Ian Chesal
Welcome to the community.
Unfortunately, a Docker runners container is not gracefully shutting down at the moment.
In the same way, it is not possible to configure a runners' container to shut down itself after a task is done.
We do have an existing feature request for it to gracefully shutdown a Runners container that can be located through this link. - https://jira.atlassian.com/browse/BCLOUD-21664
You can upvote and watch it for now so that you'll be notified of any updates from our team when the feature becomes available on Bitbucket Cloud.
Please do note that we don't have an exact ETA for the feature request as all new features will be implemented according to our policy here.
As a workaround, as mentioned in the BCLOUD ticket as well, you can either:
You can check this link for the Pipelines API.
Do let me know if you have further questions.
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great. Glad to know it helps.
Let me know if you have further questions that I can help with.
Otherwise, feel free to mark the question as answered.
Regards,
Mark C
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.