June 3, 2017

Jenkins and BitBucket

As much a note to self as anything else.

Adding setting Jenkins up to be build checkins from BitBucket is pretty easy. Not as easy as it would be with GitHub but that’s a function of the relative mindshare. The documentation describes setting up a web hook as you’d expect nowadays and so forth. Until you realise that this only applies to the BitBucket Cloud service and not the self-hosted BitBucket Server. Oddly, the self-hosted edition does not include web hooks and it’s probably a sign of how ubiquitous they’ve become that not having the feature is startling.

Cobbling together information from both the Jenkins and BitBucket sides we got it working using the Bitbucket Server Web Post Hooks Plugin with BitBucket and the Bitbucket Branch Source Plugin on the Jenkins side. The CloudBees’ documentation is much better than Atlassian’s here. I get the distinct impression Atlassian wants you to use their hosted service nowadays.