> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paradime.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Turbo CI on BitBucket pull requests

> Trigger a Paradime Turbo CI Bolt schedule from a BitBucket pipeline to build and test only the dbt™ models changed in a pull request before merge.

export const Arcade = ({src, title}) => <div style={{
  position: 'relative',
  paddingBottom: 'calc(56.2225% + 41px)',
  height: 0,
  width: '100%'
}}>
    <iframe src={src} title={title} frameBorder="0" loading="lazy" allow="clipboard-write" allowFullScreen style={{
  position: 'absolute',
  top: 0,
  left: 0,
  width: '100%',
  height: '100%',
  colorScheme: 'light'
}} />
  </div>;

Run Turbo CI on BitBucket pull requests. First complete the shared [Turbo CI setup](/products/bolt/ci-cd/turbo-ci/index) — the `ci` environment, the custom schema macro, and the Turbo CI job — then wire up your BitBucket pipeline.

## Generate API keys

To trigger the Turbo CI schedule from your pipeline, generate a Paradime [API key](/developers/api-keys) with the **Bolt schedules admin** capability. Generate an **Account API key** (a `prdm_cmp_...` Bearer token) and save the token, your **workspace token**, and the **API endpoint**; you will add them as CI/CD variables in the next step.

<Card title="Generate API keys" href="/developers/api-keys" horizontal icon="arrow-right" />

## Create a BitBucket Pipeline

Create a `bitbucket-pipelines.yml` file in your dbt™ repository and enter the values required.

```yaml title="bitbucket-pipelines.yml" lineNumbers theme={"system"}
# Base Docker image for all pipeline steps
image: python:3.11

# Reusable step template
definitions:
 steps:
   - step: &paradime-turbo-ci
       name: Paradime Turbo CI
       script:
         # Export Paradime credentials from repository variables
         - export PARADIME_WORKSPACE_UID=$PARADIME_WORKSPACE_UID
         - export PARADIME_API_SECRET=$PARADIME_API_SECRET
         - export PARADIME_API_ENDPOINT=$PARADIME_API_ENDPOINT

         - export PR_NUMBER=$BITBUCKET_PR_ID
         - echo "PR Number: $PR_NUMBER"
         - echo "Commit Hash: $BITBUCKET_COMMIT"

         # Install the Paradime Python SDK
         - pip install paradime-io

         # Run the Turbo CI schedule for this PR and wait for completion
         - paradime bolt run "flowing-pachy-wyy4fs" --branch $BITBUCKET_COMMIT --pr-number $PR_NUMBER --wait
       size: 2x
       max-time: 60

# Run the pipeline on pull requests from any branch
pipelines:
 pull-requests:
   '**':
     - step:
         <<: *paradime-turbo-ci
```

## Add the variables in BitBucket

Add these as BitBucket repository variables:

* `PARADIME_API_SECRET` — your account API key (`prdm_cmp_...`)
* `PARADIME_WORKSPACE_UID` — your workspace token
* `PARADIME_API_ENDPOINT`

<Arcade src="https://demo.arcade.software/F07biP3yTQk37Ntyc095?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true" title="BitBucket" />

## View run logs

Inspect the run logs for each Turbo CI run like any other Bolt schedule.

<Card title="Run details" href="/products/bolt/managing-schedules/run-details" horizontal icon="arrow-right" />


## Related topics

- [Turbo CI for dbt™ pull requests](/products/bolt/ci-cd/turbo-ci/index.md)
- [Turbo CI on GitHub pull requests](/products/bolt/ci-cd/turbo-ci/github.md)
- [Turbo CI on Azure DevOps pull requests](/products/bolt/ci-cd/turbo-ci/azure-devops.md)
- [Migrate dbt™ jobs from GitHub Actions to Paradime Bolt](/guides/migrations/migrating-dbt-tm-jobs-from-github-actions-to-paradime-bolt.md)
- [Column-Level Lineage Diff on BitBucket](/products/bolt/ci-cd/lineage-diff/bitbucket.md)
