ivanursul

Software engineer

How to integrate Jenkins with Bitbucket

Recently I had an issue with integrating Jenkins CI with Bitbucket CVS. My goal was to trigger jenkins to start running job, when commit to bitbucket will be pushed. Steps I made to made jenkins trigger job:

Install Bitbucket plugin

Set the Jekins job’s Build trigger to Poll SCM, but do not specify a schedule

Create a github post-receive trigger to notify the URL

http://yourserver/git/notifyCommit?url= example

http://builds.yoursite.com/git/[email protected]:nick/project.git This will tell Jenkins to trigger whenever code in bitbucket will be changed.

Note, that Jenkins will check whether changes were made and will start only in case of new changes in repository.