---
title: Native Builds with Bitbucket Pipelines
description: Trigger Capawesome Cloud native iOS and Android builds from Bitbucket Pipelines using the Capawesome CLI.
---

# Bitbucket Pipelines

Trigger native builds from Bitbucket Pipelines. The build runs in Capawesome Cloud, so the pipeline only authenticates and starts the build.

## Prerequisites

Create an [API token](../../accounts/tokens.md) in Capawesome Cloud and store it as a secured repository variable named `CAPAWESOME_TOKEN`.

## Pipeline

```yaml title="bitbucket-pipelines.yml"
image: node:24

pipelines:
  custom:
    native-build:
      - step:
          name: Create native build
          script:
            - CLI=4.9.3
            - APP_ID=00000000-0000-0000-0000-000000000000
            - npx @capawesome/cli@$CLI login --token $CAPAWESOME_TOKEN
            - npx @capawesome/cli@$CLI apps:builds:create --app-id $APP_ID --platform android --git-ref $BITBUCKET_COMMIT --yes
```

Pin the CLI version for reproducible runs. To attach a signing certificate or environment, pass the relevant flags — see the [CLI reference](../../cli/commands.md#appsbuildscreate).
