Hello Atlassian Community,
I am looking to automate the management of workspace and repository runners in Bitbucket Cloud and Bitbucket Pipelines. Specifically, I want to create and update these runners programmatically, ideally using an API or a similar method. This would allow me to manage runner configurations dynamically as part of our CI/CD processes.
Could anyone provide guidance or examples on how to achieve the following using Bitbucket's API or any other method:
I saw an open ticket and some discussions about workarounds. Does Atlassian have any recommended methods to set this up ? BCLOUD-22032 : Runner Update Options
Any help or pointers towards relevant documentation would be greatly appreciated!
Regards,
Gajesh
Hello @Gajesh Bhat ,
thank you for reaching out to the Community!
I would suggest taking a look at the runner's autoscaler tool release last year that can be deployed into a kubernetes environment and already contains the logic to scale the number of runners similar to what you described in your question :
Bitbucket Cloud currently doesn't have public API endpoints for managing runners, so the auto scaler tool makes use of internal API endpoints to make the requests to create/delete runners. Those are the same internal APIs used by the UI when making such actions in the Bitbucket portal.
Also, the good thing about the autoscaler tool is that its source code is published in a public repository, so if you have different requirements and cannot leverage the autoscaler for your use case, you can still dive into its code to have more details about the implementations and the APIs being used, and come up with your own solution :
Lastly, for the runner's auto-update functionality, currently, the runners can only be updated manually or, as a workaround, through custom scripts as suggested by other users in the feature request BCLOUD-22032. There's not a native functionality for this porpoise yet, as this is being tracked and considered as a future implementation on that feature ticket.
If you would be interested in that, we encourage you to add your Vote to the feature to increase its visibility and also mark yourself as a watcher so you get notified about any future updates.
I hope that helps! Should you have any questions, let us know!
Thank you, @Gajesh Bhat !
Patrik S
Thank you @Patrik S I will use a workaround until the feature is officially supported. I also found a link where the Release notes for Bitbucket Pipeline Runners are posted. Is this page consistent ? Can I point my script to parse this page to look for the latest runner version ? Link to Changelog https://product-downloads.atlassian.com/software/bitbucket/pipelines/CHANGELOG.md
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Gajesh Bhat ,
Yes, you can use that page to get updates on new runner versions being released.
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.