On my Jenkins I configured:
Source Code Management
Git repository: https://bitbucket.org/username/project.git
credentials: username/
After some struggling with the BitBucket plugin, I have managed to get it working. Below is the summary of things I found are necessary for builds to be triggered, but are not obvious from plugin's documentation:
repository push
trigger enabled. I thought pull request created
/ updated
would suffice (building on PR is what I wanted) but the plugin reacts only to push.https://bitbucket.org/REPOSITORY_OWNER/REPOSITORY_NAME
. Plugin will not match it if it's the SSH url.I hope this helps. If the build is still not triggered for you, try enabling logs for the following classes:
com.cloudbees.jenkins.plugins.BitbucketHookReceiver
com.cloudbees.jenkins.plugins.BitBucketTrigger
com.cloudbees.jenkins.plugins.BitbucketJobProbe
com.cloudbees.jenkins.plugins.BitbucketPayloadProcessor
com.cloudbees.jenkins.plugins.bitbucket.BitbucketSCMSource