Bitbucket (Server) CI: PR Gating via Aikido Dashboard with a Personal Access Token
Introduction
You can easily configure GitLab MR Gating via the Aikido interface. This doc focusses on managing configurations in bulk - multiple repos at the same time - without code.
Use Cases
Bulk Repository Management: Easily specify and manage configurations for multiple repositories at once through the Aikido interface.
Zero Code Integration: Install the Aikido app on GitLab to manage checks without embedding any code, simplifying the setup process.
Cost Efficiency: By managing GitLab Checks through Aikido, avoid using CI minutes on GitLab, leading to significant cost savings.
Creating a Personal Access Token
Bitbucket supports creating Personal Access Tokens via the API tokens, which all work the same way.
Navigate to the "API Tokens" settings page
Select the "Create API token with scopes" option to start creating a token.
On the next screen add a descriptive name for the token like "Aikido Security CI Checks", and enter an expiration time as far in the future as possible. Click "Next"
Create the token for "Bitbucket", click "Next"
In the following step, you need select the scopes for this token, Aikido needs the following scopes to be added to the token: - delete:webhook:bitbucket - read:webhook:bitbucket - write:webhook:bitbucket - read:pullrequest:bitbucket - write:pullrequest:bitbucket - read:repository:bitbucket After selecting all of these scopes, click "Next"
Now, you can review the settings for the API token and create it, if the configuration is correct you can click on "Create token"
Now your token is created, copy it and keep it for the next step.
Setting up Bitbucket CI
Step 1. Enter the token from the previous part into the input field on this page, together with the email address of the user in Bitbucket who created the token and click "Update token"

Step 2. Aikido redirects you to the Bitbucket CI page with an overview of your repos. You can start configuring your repos. We recommend starting out with 1 repo to make sure everything works well. Step 3. Select repos in bulk and click Setup MR Scans button in the floating bulk actions bar on the bottom.
Step 4.This will trigger the modal to choose the severity level for failure and the scans you want to execute.
Adding Exceptions for specific repos
You might want to have 1 specific repo where the configuration slightly differs. You can easily add exceptions by clicking the triple dots on a repo item or just select 1 or more items and go through the Configure Scans process again.
Last updated
Was this helpful?