Bitbucket Setup for Continuum
Overview
Networking Requirements
Bitbucket will need outbound access to push events to Continuum on the default port of 8080. Contnuum will need inbound access on the same port.
Test Bitbucket Webhook Connectivity
Setup Temporary Test Webhook
Login to your Bitbucket application and select a repository to setup the webhook on. Click the Settings
icon on the left (looks like a gear). Under Integrations click Webhooks
. Click on the Add webhook
button.
In the Title
field put "Test Continuum".
In URL
you will want to enter the Continuum address as in the example that follows:
http://continuum.mycompany.com:8080/api/submit_change
Make Status
as "Active". Triggers
should be "Repository push". Click the Save
button.
Test the Webhook Push
Now submit a change to your Bitbucket repository. This simply can be a change to a file, commit and push and can be from the Bitbucket web user interface.
Return to the Webhooks page for your repository. Next to the "Test Continuum" webhooks click View Requests
. On the repo:push
line you should see a red "400". Click on View details
.
Scroll down you will see the body that was returned. The following reponse is what we want:
{
"ErrorCode": "AuthenticationFailure",
"ErrorDetail": "",
"ErrorMessage": "Authentication Failure",
"Method": "",
"Response": ""
}
We attemptped to POST the changes unauthenticated to the Continuum REST API. Since we are simply testing connectivity for now this error is the one we are expecting.
Any other errors beside the Authentication Failure error need to be resolved. These typically will be server address, port or networking issues that will need to be resolved (e.g. if a TIMEOUT occurs).
Common problems to look for:
- Wrong Continuum server address and port
- Network access from Bitbucket server to Continuum server
- Local firewall on Continuum server needs to allow port 8080
- Bitbucket webhook not enabled for repository
- Commit was not pushed to Bitbucket
- The URL configured in the Bitbucket plugin should be the API URL, not the UI URL.
https://api.bitbucket.org
If you continue to have problems with getting the changes posted from Bitbucket to Continuum, contact support@versionone.com.
Delete the Temporary Webhook
We we return to create a more permanent webhook later. For now return to the Webhooks page and delete the temporary webhook.
Next
Return to Connecting to Tools