🔴 FREE LIVE WEBINAR
How to Become a DevOps Engineer in 2027
From Zero to DevOps Champion!
November 21st, 2026 | 9:30 AM CST
Live DevSecOps CI/CD Demo
Career Roadmap • Live Q&A
🚀 REGISTER FOR FREE
🚀 NEW WEEKEND BATCH
AI-Enabled DevSecOps & Cloud Engineering Bootcamp
Starts December 5th, 2026
Sat: 9:30 AM – 11:30 AM CST
Sun: 10:30 AM – 12:30 PM CST
15 Weeks • 70+ Labs • Live Training
EXPLORE BOOTCAMP →
3,500+
Students Trained
25+
Years of IT Experience
70+
Hands-On Labs
🔴 FREE Webinar | Nov 21 Register Free
🚀 New Batch | Dec 5 Explore Bootcamp
🎁 FREE Career Roadmap Get Roadmap

Friday, February 8, 2019

How to configure webhooks in Bitbucket to trigger a build in Jenkins? How to trigger automated builds in Jenkins through Bitbucket?

Webhooks are triggers that enables developers to trigger Jenkins jobs automatically every time there is a code change

Jenkins does automated builds in two ways:

1. pull - using poll scm
2. push mechanism - by triggering a build from Bitbucket or GitHub for every repository changes.

we will see in this article how to trigger a(push) build for every change in bitbucket repository:





Changes needed in Jenkins


1.Click on Manage Jenkins.  
2.Click on Configure Global Security.
3.Uncheck the option for Prevent Cross Site Request Forgery exploits
4.In matrix-based security change:

for Anonymous user, do the below:

Overall - Read  
Job - Build 
Job - Read  
Job - Workspace



 
 
 
 
Select the job you would like to configure webhook is for. Choose configure 
Also you need to have token created for the job you would like to trigger. 
Click on the build job. Go to triggers section and click 
on 
 Authentication Token field.














Changes in Bitbucket

1. go to bitbucket, choose the repository, go to settings, click on web hooks.

2. enter title, url which is your jenkins job url - append build/?token=myToken
 example the url should be like this - http://jenkins_server_url/job/myFreeStyleJob/build?token=myToken
3. status should be active
4. click on skip certificate verification
5. triggers --> repository push

Now make a code change in bitbucket to see if that triggers a build in Jenkins automatically.

No comments:

Post a Comment

FREE LIVE WEBINAR | How to Become a DevOps Engineer in 2027

 🚀 Your Future in DevOps Starts Here! New Skills. New Opportunities. A New Career Direction. The world of technology is evolving faste...