Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to self drain bitbucket selfhost docker runner

Arunkumar Gaddam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 21, 2025

In my case bitbucket APIs are not so useful to deregister runners.

I have a repo and multiple steps in repo are using selfhost docker runner label and running simultaneosly in different vms using vm azure scale set.

vm get spinned up only when job runs and should get deleted once job completes and docker runner self drains.

 

Since docker runner does not self exits it is bit hard to watch out pipelines and go to scaleset and shut down vms

Kindly assist

 

Regards,

Arun

1 answer

0 votes
Mark C
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 23, 2025

Hi @Arunkumar Gaddam

Welcome to the community.

Could you confirm if you're using Bitbucket Cloud Pipelines autoscaler?

If not yet, Pipelines autoscaler has an autoscaler cleaner where it automatically clean (delete) unhealthy runners and linked jobs.

If you're not using it, you will have to manually remove the stale runners and/or write your own script that will do the cleanup in your specific environment.

Regards,
Mark C

Arunkumar Gaddam
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 23, 2025

Thank you for your response @Mark C 

I found a way to clean up

I am facing different issue now

Can I use same runner which is running in multiple VMs with same runner uuid and with same label

so can I run it in different steps of pipeline or different repo pipelines ?

I would like run all those steps or repo pipelines simultaneously without being queued

when I did so it throws an error

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events