Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

sowmyanx I'm New Here Dec 06, 2021

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,
Caroline

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

⭐ Calling all Bitbucket and DevOps experts: Special showcase opportunity ⭐

Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...

1,519 views 4 8
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you