This document is not very helpful:
https://developer.cloudbees.com/bin/view/DEV/Bitbucket
I have:
But how to actually use a (Private) Bitbucket repo for a Jenkins Build.
AFAIK, at the end you are using a Git repository, so it is the same if your repo is in one provider or another one. So your git repo should have a Repository URL like this one below (https or ssh) and a username/password.
https://[email protected]/felix/my-git-repo.git
So you need to enter these information on your Jenkins job->Source Code Management->Git Repositories (same thing for Forge (CloudBees), GitHub, ....)
The BitBucket plugin just let you configure Bitbucket to automatically trigger a build on commit. The method below is a workaround as the way explained on the doc doesn't work.
On Jenkins:
Get your API token from your Jenkins instance. You can get it form here:
https://[account].ci.cloudbees.com/user/[the-user-portion-of-your-email]/configure
On your Jenkins job, you need to enable:
Trigger builds remotely (e.g, from scripts). Need to add the authentication token.
Build when a change is pushed to BitBucket
On BitBucket
https://[the-user-portion-of-your-email]:[apitoken]@[account].ci.cloudbees.com
NOTE: the-user-portion-of-your-email should correspond with one of the user at "People" section in Jenkins.
Add project name = job name in Jenkins
Add token
UPDATE
POST is working perfectly, CloudBees just missed the character"/" at the end of the URL used to hook the trigger. So it should be https://[account].ci.cloudbees.com/bitbucket-hook/ and NOT https://[account].ci.cloudbees.com/bitbucket-hook
Official CloudBees BitBucket doc are now updated.