Missed Team ’24? Catch up on announcements here.

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

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

sowmyanx
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!
December 6, 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
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 7, 2021

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
AUG Leaders

Atlassian Community Events