Bitbucket Cloud

In addition to our out-of-the-box integration with GitHub , Spacelift supports using Bitbucket Cloud as the source of code for your stacks and modules.

Setting up the integration

In order to set up the integration from the Spacelift side, please navigate to the VCS providers section of the admin Settings page, find the Bitbucket Cloud integration and click the Set up button:

VCS providers page

This should open a form like this one:

Bitbucket Cloud setup form

Now you'll have to fill in the Username, which is a username of your Bitbucket Cloud account.

In order to get the App password you'll need to go to the Bitbucket Cloud site and navigate to Personal settings -> App passwords (it's under Access management) -> Create app password. There, you will need to give your new app password a label and give it read access to repositories and pull requests:

App password creation

This will give you an app password token which you can put into the App Password field in the integration configuration.

Created new app password

After doing all this you should have all fields filled in.

Filled in Bitbucket Cloud integration form

After saving, you'll receive your webhook endpoint:

Configured integration

For each repository you want to use with Spacelift, you now have to go into its Repository settings -> Webhooks -> Add webhook, and configure the webhook accordingly, by activating Push and Pull Request Created events.

The last step is to install the Pull Request Commit Links app to be able to use this API. This is done automatically when you go to the commit's details and then click "Pull requests" link.

Commit's details

When creating a Stack, you will now be able to choose the Bitbucket Cloud provider and a repository inside of it:

Stack creation form

Unlinking the Integration

If you no-longer need the integration, you can remove it via the Unlink button on the VCS settings page.

VCS providers page

Please also remember to remove any Spacelift webhooks from your repositories.