Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How to use/integrate Bitbucket with Github Actions

Thimo König
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!
March 16, 2022

We do have a setup of hosting Code in Bitbucket and building it using Jenkins. We would like to get rid of Jenkins and move to Azure DevOps or Github Enterprise but keep the Repositories in Bitbucket. I can find documentation on how to integrate Bitbucket into Azure DevOps Pipelines but I cannot find any documentation on how to use Github Actions to do the same.

I assume it should be feasable by defining webhooks in Bitbucket to trigger Github Actions. Did anybody already do this? Is this possible? Is there a documentation somewehere out there?

Thanks
Thimo

1 answer

0 votes
Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 16, 2022

Hi @Thimo König ,

first, thb: I´m not proficient with Github Enterprise (just github cloud) but as I got it those are 2 completly different things. 

What is the requirement behind that? Why should source code be exchanged between 2 systems when the functionality could be implemented in either 1 of them (more likely even easier and more reliable).

Personally I am a BIG fan of github actions (one reason I chose github). If bitbucket is a hard requirement I would stick to pipelines (or to something that has kind of native integration like bamboo).

Best
Stefan

Thimo König
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!
March 17, 2022

Hi @Stefan Salzl ,

the requirement is to have a smooth migration path. The objective is to move away the current Bitbucket and Jenkins setup and to use github only. The first step would be to move the build and then later the repository too.

Github Enterprise is not that different as you think. Basically it is the github but running in an OnPrem DataCenter rather then the cloud. So from a feature perspective they are absolutly comparable.

In the meanwhile I guess I found an option. The problem seems to be that github actions are way more integrated into the version control system. Seems like the best approach would be to automatically mirror the bitbucket repo to github so actions could be used. Any ideas/comments on this approach?

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 23, 2022

Hi @Thimo König 

I disucessed with some of my colleagues and did a small research on that topic. I just can come up with 2 things/links describing the mirroring of bitbucket to github. Therefore I guess this can be done. I just don´t have any experience with but thought it might be interesting for to give it a shot:

it seems this is native git:
https://www.basvanbeek.nl/linux/how-to-mirror-bitbucket-repository-to-github/

the following is a plugin from atlassian marketplace:
https://marketplace.atlassian.com/apps/1211351/repository-mirror-plugin-for-bitbucket?tab=overview&hosting=server

 

Looking forward to your feedback or also info if you already found a solution and if so: which one.

Best
Stefan

Like Steffen Opel _Utoolity_ likes this
pavanraga August 29, 2023

Is mirroring the git repos to github the only way?

 

can we not have git action (runnners on cloud or self hosted) directly integrate with bitbucket through webhooks?

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 29, 2023

@pavanraga I guess there might be lot´s of hick-ups between the systems or data that might not be thought of and not considered to be in a webhook as (my personal view) the system and actions/pipelines were not meant to built/used like this. 

Why should I use 1 git environment for hosting my code and another git environment to write pipelines to handle the code in the other environment (as 1 and the same environment could do both) ?

This is such a specific question that needs to be called to the vendors. Pesonally I can´t answer this question as there is too much unknown.

Best
Stefan

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events