This page contains instructions for creating a Bitbucket Cloud configuration so that users will have the option to select Bitbucket Cloud as the source code repository host for new algorithms they create.
Bitbucket Cloud setup
- Log in to Bitbucket Cloud.
- Click on the user icon in the lower-left corner select your workspace.
- Select Settings and then OAuth consumers from the options at left.
- Enter a unique name (e.g., “Algorithmia”) to identify the application.
- Enter a valid callback URL. The format of this is
https://CLUSTER_DOMAIN
, whereCLUSTER_DOMAIN
is the domain name of your Algorithmia cluster (e.g.,algorithmia.com
). -
Check the following boxes as shown below, to grant Algorithmia the necessary permissions to create and manage Bitbucket repositories for algorithm source code:
- Account: Read
- Repositories: Write, Admin, Delete
- Webhooks: Read and write
- Click Save at the bottom.
Click on the name of the new consumer in the list that appears.
To edit the consumer configuration, click the ellipses at the right and select Edit.
You’ll need the application ID and secret values displayed here in the next step when you complete the SCM provider configuration within Algorithmia.
Algorithmia setup
Once you’ve created an OAuth consumer in Bitbucket Cloud as described above, log in to Algorithmia as a cluster admin and navigate to the Source Code Management page from the admin panel. Click Add SCM Configuration and select Bitbucket Cloud from the drop-down.
Enter the base website, API, and SSH endpoint URLs. The pre-filled values that appear are just placeholders, so you must actually enter the paths in each field even if you just want the defaults.
The Website URL is the URL of your Bitbucket Cloud instance, which is https://bitbucket.org
for the public domain.
The API URL is the URL for your Bitbucket Cloud instance’s API, which is https://api.bitbucket.org
for the public domain.
The SSH URL is the URL from which we’ll attempt to pull source code from your Bitbucket instance, which is ssh://git@bitbucket.org
.
Under the OAuth information section, enter the values from the consumer configuration above for consumer key and consumer secret and click Create SCM Configuration.
Once you’ve created the configuration, it’ll show up in the list of SCM configurations on the Source Code Management page.