+91 700 483 5930   +91 810 584 3520    info@scmgalaxy.com
LOGIN
Sign In or Register
Avatar
Not Registered Yet?

Join Now! It's FREE. Get full access and benefit from this site

Reset My password - Remind Me My username

Username
Password
Remember me
 
scmGalaxy logo

Build when a change is pushed to Bitbucket

Bitbucket plugin is designed to offer integration between Bitbucket and Jenkins.

It exposes a single URI endpoint that you can add as a WebHook within each Bitbucket project you wish to integrate with. This single endpoint receives a full data payload from Bitbucket upon push (see their documentation), triggering compatible jobs to build based on changed repository/branch.
 
 
Step 1 - Install "Bitbucket Plugin" at your Jenkins
 
Step 2 - Add a normal Post as Hook to your Bitbucket repository (Settings -> Hooks) and use following url:
https://YOUR.JENKINS.SERVER:PORT/bitbucket-hook/
and if you have setup authentication on jenkins then URL must be like
 
https://USERNAME:This email address is being protected from spambots. You need JavaScript enabled to view it.:PORT/bitbucket-hook/
 
Step 3 - Configure your Jenkins project as follows:
 
Step 4 - Under build trigger enable Build when a change is pushed to BitBucket
 
Step 5 - under Source Code Management select GIT; enter your credentials and define Branches to build (like **feature/*)
 
Note 1 - Make sure to include the slash ('/') on the end of the URL or the hook won't work.
Note 2 - Please read the BitBucket Plugin info page as well https://wiki.jenkins.io/display/JENKINS/BitBucket+Plugin
 
Reference 1  
https://confluence.atlassian.com/bamboo/repository-triggers-the-build-when-changes-are-committed-289276902.html
 
Reference 2 - Login issues with Jenkins url
http://www.scmgalaxy.com/tutorials/how-to-trigger-builds-remotely-in-jenkins
 
Rate this item
(3 votes)
Rajesh Kumar

.

Total, Over 12 years of extensive experience in the Software Configuration Management domain having depth knowledge of DevOps, Continuous Integration and Delivery, Configuration Management, Build and Installer, Release Management and Application Management.

More in this category:

NEW TUTORIALS