Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Looking for Webhook to Trigger CI job in Jenkins after PR is merged in Bitbucket

Hi Team,

I am looking for webhook which can be used to Trigger CI JOB on jenkins once the pull request is merged against branch.

Use Case: Developers usually create a local branch and raise PR against target branch, once this PR is merged against a target branch it should automatically start CI job on jenkins.

Please let me know if anyone were able to make use of webhooks on Bitbucket to achieve this 

1 answer

0 votes

Hi, @sowmyanx! Welcome to the community! 

In order to trigger a CI job in Jenkins after a pull request is merged in Bitbucket, you can follow the next steps:

  • Open your repository > Repository settings > Webhooks

  • Click on Add webhook

  • Add a title and the URL

  • Under Triggers, select the Merge option

  • Click Save

In case you would like to read more about Webhooks, you can access the following link:

Also, if the server that has Jenkins installed is behind a firewall, you might need to whitelist these IP addresses so Bitbucket can reach them: 

I hope this helps, but do let me know if you have any questions. 

Kind regards,

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events