Bitbucket Integration Guide
This guide provides step-by-step instructions on how to connect your Bitbucket repository with the AppAmbit Dashboard to enable automated CI/CD workflows.
Prerequisites
Before you begin, ensure you have an existing Bitbucket repository with a configured bitbucket-pipelines.yml
file that generates the required build artifacts.
Step 1: Create a Repository Access Token
The AppAmbit Dashboard needs an Access Token to communicate securely with your Bitbucket repository.
-
Navigate to your Bitbucket repository and click on Repository settings in the left-hand menu.
-
Select Access tokens and click the Create access token button.
-
Configure the token with the following permissions:
- Name: Give your token a descriptive name (e.g., "AppAmbit Dashboard Delivery").
- Scopes: Grant the following permissions:
Pipelines
: ReadWebhooks
: Read and writeRepositories
: Read
-
Click Create.
Save Your Token!
Bitbucket will only show you the token once. Copy it immediately and store it in a secure place. You will need this for Step 3. If you lose it, you must create a new one.
Step 2: Configure the Webhook
The webhook notifies the dashboard whenever a pipeline completes.
- In Repository settings, navigate to Webhooks under the "Workflow" section and click Add webhook.
Tip
For a quick start, use Bitbucket’s official templates for your technology stack. These templates provide a solid foundation and can be customized to fit your deployment process.
-
Fill in the configuration form:
- Title: A descriptive name (e.g., "AppAmbit Delivery Notification").
- URL: Your dashboard's webhook endpoint.
[https://appambit.com/bitbucket/webhook/YOUR_APP_KEY_HERE](https://appambit.com/bitbucket/webhook/YOUR_APP_KEY_HERE)
- Secret: Paste the
Webhook Secret
. For instructions on how to generate it, see the Securing Your Webhooks section in our overview guide. - Triggers: Select Repository > Build status updated. This ensures the webhook fires only after a pipeline run is complete.
-
Click Save to create the webhook.
Step 3: Configure AppAmbit Dashboard
The final step is to provide your repository details and the Access Token to the dashboard.
- Navigate to your App's Edit view in the AppAmbit Dashboard.
- Locate the App Release section.
- Fill in the following fields:
- Repo name: Enter your Bitbucket repository name in the format
workspace/repository-slug
. - Delivery token: Paste the Bitbucket Access Token you created in Step 1.
- Repo name: Enter your Bitbucket repository name in the format
- Click Save changes.
Configuration Complete!
Your Bitbucket repository is now fully integrated. From now on, successful pipeline runs will automatically appear in your Releases Section.
Troubleshooting
- Ensure the webhook URL and secret are correct.
- Verify workflow artifacts are generated as expected.
- Check permissions for the Personal Access Token.
- Review Bitbucket Pipelines (Webhooks) logs for errors.
Next Steps
Learn about Azure CI/CD integration