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

How to trigger builds from Bitbucket cloud to jenkins in local network

Greens January 31, 2023

We use bitbucket server in the local network and webhooks work fine with jenkins in the same local network.

We have to migrate bitbucket to the cloud. How can we trigger builds on our local jenkins?

A firewall gate is not an option (company policy)




1 answer

0 votes
Erez Maadani
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 31, 2023

Hey @Greens

If I understand correctly, the issue is that you can't have external URL which would be reachable from bitbucket cloud, to be used a webhook.

The simplest way would be to use the "Poll SCM" option in the Build Trigger section of your Jenkins Job. This means that your Jenkins would periodically would reach out to and try to understand if and what has changed and then trigger a build if needed.

This is an "expensive" action so you might need to do some tuning on the polling frequency.

A more efficient yet complex way would be to talk to your IT people and ask them what is allowed in the firewall: protocols? ports? URLs? and then try and trigger your builds using one of the allowed options - Specific port? SSH? 

You can also consider using a third party like RabbitMQ. BB will send message to the queue using a webhook and your Jenkins will be registered as a consumer to the same queue.

Hope that helps  

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events