Configure Self Hosted Bitbucket Webhook
* 
The bitbucket repository integration is limited to the repositories created by individual bitbucket user accounts.
Make sure there is no repository in the Codebeamer project with the same name
Use Existing External Repository is not supported! The webhook execution after the first push will create the repository.
Configure Codebeamer
There are two important tasks that you can perform in the Codebeamer:
1. Create user(s) who has the same username as the pusher(s) in Bitbucket.
2. Add the secret token of the webhook to Codebeamer configuration (see below)
Steps to configure secret token in Codebeamer:
Go to Codebeamer's System Admin page
Go to Application Configuration
Add scc node if it is not exist in your json (json root level)
Add bitbucket node if it is not exist in your json under scc node
Add secretToken:Codebeamer under bitbucket node
Add baseUrl:<base_url> under bitbucket node
Where base_url is the base url of your bitbucket server
* 
With the version of 9.5.0-LTS containerized Codebeamer instance, base_url have to be closed with forward slash!
Add username: <bitbucket_username> under bitbucket node
Where bitbucket_username is a bitbucket username who has access to the repository. It is necessary for Bitbucket API calls
Add password: <bitbucket_password> under bitbucket node
Where bitbucket_password is the password for the given bitbucket user. It is necessary for Bitbucket API calls. After you save the configuration the password will be encrypted
Add secretToken:<secret_token_of_the_webhook> under bitbucket node
Configure Bitbucket webhook
Steps to configure bitbucket webhook:
Navigate to the Settings page of a repository.
Choose Webhooks menu.
Click on Add webhook.
Fill out the fields.
Name: Title of your choice.
URL: <Codebeamer_url>/rest/scm/bitbucket/<project_id> Where Codebeamer_url is the url of your Codebeamer and project_id is the id of your project where the Bitbucket repository will belong to after the first webhook execution Example: https://Codebeamer.com/cb/rest/scm/bitbucket/1.
Secret: Codebeamer validates the source of the requests with the Secret Token. It is required to set the same Secret Token in Bitbucket and in Codebeamers's Application Configuration too (see above).
Status: Active; checked (default).
Check/Uncheck SSL/TLS according to your Codebeamer server SSL/TLS configuration.
Triggers: Repository push (Codebeamer supports only push event).
Click on Save.
Was this helpful?