Trigger a Build in Jenkins using Bitbucket Hooks
- How to build when a change is pushed to Bitbucket?
- Trigger a Build/Job in jenkins when chnages pushed to Bitbucket?
- How to Automate Build process when changes pushed to Bitbucket?
To answer the above, Jenkins provides a plugin,
Bitbucket plugin is designed to offer integration between Bitbucket and Jenkins
1. Install “Bitbucket Plugin” at your Jenkins
Jenkins Home -> Manage Jenkins -> Plugin Manager -> Select Available Tab -> In searchbox enter Bitbucket Plugin and enter
Bitbucket Pluginthen Click on install and restart
2. Add Webhook to your Bitbucket repository (Repository Settings -> Webhooks -> Add Webhook)
Title: Test Webhook
SSL / TLS: [x] Skip certificate verification as we are using
http in the URL
NOTE: If we are seting up authentication on jenkins then URL must be like
Finally Click on Save
3. Configure Jenkins Job
Under Section build trigger enable Build when a change is pushed to BitBucket
Under Source Code Management select GIT; enter your credentials and define Branches to build