Bitbucket Datacenter

Integrating with a VCS provider unlocks the ability to use GitOps workflows, import modules, enable Open Policy Agent, and much more.

To enable Bitbucket Datacenter, go to “Integrations” at the account scope and select Bitbucket Datacenter. Enter the provider name and URL of Bitbucket.

Log in to Bitbucket Data Center by clicking on the link provided and create a new personal access token.

Set the permissions as shown below:

Click Create and then copy the token:

Go back to Scalr, enter the token, and click “Create”.

Commit Strategy

Admins can choose between the following two commit strategies when adding a VCS provider connection. All workspaces that use this VCS connection will inherit this setting:

Head Commit of the Base Branch: The default base commit strategy compares the latest head commit with the base branch commit

Previous Commit of the PR Branch: The commit compares the latest head commit with the previous head commit

The head commit strategy compares ALL commits in the PR every time a commit is pushed, while the previous commit strategy only compares the new commit to the previous commit that was made.

Automatic Base Branch Merge Before Run Execution

VCS-driven workspaces can automatically merge the base branch into the head branch before triggering a run. This ensures that runs are always executed against the latest code in the base branch, providing more accurate and reliable results. This helps a common pain point where runs could be executed against outdated head branches, potentially leading to false-positive results or failed applies after merging.

To implement this feature, enable the auto-merge option when configuring the VCS provider: