Bitbucket Cloudยป
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:
This should open a form like this one:
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:
This will give you an app password token which you can put into the App Password field in the integration configuration.
After doing all this you should have all fields filled in.
After saving, you'll receive your webhook endpoint:
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 the following events:
- Repository > Push
- Pull Request > Created
- Pull Request > Updated
- Pull Request > Approved
- Pull Request > Approval removed
- Pull Request > Merged
- Pull Request > Comment created
It should look something like the following:
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.
When creating a Stack, you will now be able to choose the Bitbucket Cloud provider and a repository inside of it:
Unlinking the Integrationยป
If you no-longer need the integration, you can remove it via the Unlink button on the VCS settings page.
Please also remember to remove any Spacelift webhooks from your repositories.