Bitbucket
Overview
Bitbucket integrates seamlessly with Knapsack, enabling efficient management of your design system and component library. Bitbucketโs cloud-based platform provides robust features, including pull requests, inline commenting, and CI/CD integration, making it an excellent choice for development teams of all sizes.
Cloud Authoring
Authentication through Access Token
To enable cloud authoring within Bitbucket Cloud we use an Access Token for authentication. This token allows secure access to your Bitbucket repository and enables necessary actions on your behalf.
Permissions Required
You may need elevated privileges on your repository to generate a new Access Token. If you encounter any issues, please reach out to our support team for assistance.
Step 1: Generate an Access Token
- Log into Bitbucket and navigate to the repository containing Knapsack.
- In the left sidebar click โRepository settingsโ.
- Next, click โAccess tokensโ under โSecurityโ (Security ยป Access tokens)
- Name your token (i.e. Knapsack) and provide these scopes/permissions:
- Repository โ Read and Write
- Pull requests โ Read and Write
- Click โCreateโ
Step 2: Deliver Securely
- Setup a meeting with your Knapsack representative.
- Deliver securely the Access Token.

Step 3: Knapsack completes integration
-
Knapsack adds the Access Token to our secure database.
-
We run tests to verify the integrity of cloud authoring capabilities.
-
We notify you when its all done. ๐
Bitbucket Pipelines
Required Deployment Variables
Deployments to Heroku rely on the following deployment variables:
HEROKU_EMAILโ The email associated with the Heroku account.HEROKU_API_KEYโ The API Key associated with the Heroku account (found in profile settings)HEROKU_GIT_URLโ Located on the app dashboard within Herokuโs admin interface
In this example
- For any pull request, the pipeline installs dependencies and builds the application.
- For the
mainbranch, the pipeline performs two steps:- Install Deps and Build: Installs dependencies and builds the application.
- Deploy to Heroku: Deploys the built application to Heroku using authentication details provided through environment variables.