Skip to main content
If you have code in a Bitbucket repository, you might want to connect it to an Upsun project. This means you can keep your Bitbucket workflows and treat the Bitbucket repository as the source of truth for your code. Your Upsun project becomes a mirror of your Bitbucket repository. This means you shouldn’t push code directly to Upsun. Any changes you push directly get overwritten by the integration when changes happen in the Bitbucket repository. When you set up an integration with Bitbucket, it automates the following processes for you:
  • Creating a new environment when a branch is created or a pull request is opened.
  • Rebuilding the environment when new code is pushed to Bitbucket.
  • Deleting the environment when a pull request is merged.
You can set up an integration with either Bitbucket Cloud or a self-hosted Bitbucket Server.

Before you begin

To manage source integrations, you need to be a project admin. You also need a Bitbucket Cloud or Bitbucket Server repository with working code.

Bitbucket Cloud

1. Create an OAuth consumer

To integrate your Upsun project with an existing Bitbucket Cloud repository, create an OAuth consumer: