> ## 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.

# Continuous Deployment with BitBucket Pipelines

> Trigger a Paradime Bolt CD schedule from a BitBucket pipeline on merge to deploy dbt™ changes to production using the Bolt API and Account API keys.

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>;

Build custom Continuous Deployment jobs with BitBucket pipelines and the [Bolt API](/products/bolt/bolt-api). First [set up the CD Bolt schedule](/products/bolt/ci-cd/continuous-deployment/index#set-up-the-cd-bolt-schedule) and note its slug, then trigger it from your pipeline on merge.

## Generate API keys

To trigger Bolt 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"}
image: python:3.11

definitions:
 steps:
   - step: &paradime-continuous-deployment
       name: Paradime Continuous Deployment
       script:
         - export PARADIME_WORKSPACE_UID=$PARADIME_WORKSPACE_UID
         - export PARADIME_API_SECRET=$PARADIME_API_SECRET
         - export PARADIME_API_ENDPOINT=$PARADIME_API_ENDPOINT
         - pip install paradime-io
         # Run the Paradime bolt schedule (by slug) and wait for completion
         - paradime bolt run "flowing-pachy-wyy4fs" --wait
       size: 2x
       max-time: 60

# Run on pushes to main
pipelines:
 branches:
   main:
     - step:
         <<: *paradime-continuous-deployment
```

## 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="Using BitBucket Pipelines" />


## Related topics

- [Column-Level Lineage Diff on BitBucket](/products/bolt/ci-cd/lineage-diff/bitbucket.md)
- [Turbo CI on BitBucket pull requests](/products/bolt/ci-cd/turbo-ci/bitbucket.md)
- [Continuous Deployment](/products/bolt/ci-cd/continuous-deployment/index.md)
- [Bolt CI/CD for dbt™ pull requests and deploys](/products/bolt/ci-cd/index.md)
- [BitBucket](/products/settings/git-repositories/importing-a-repository/bitbucket.md)
