Documentation
plugins
sources
bitbucket
Bitbucket Source Plugin

Bitbucket Source Plugin

Latest: v1.1.0

The CloudQuery Bitbucket plugin pulls data from Bitbucket (opens in a new tab) and loads it into any supported CloudQuery destination (e.g. PostgreSQL, BigQuery, Snowflake, and more (opens in a new tab)).

The plugin discover all workspaces and repositories in your account and syncs them to the destination.

Example Configuration

This example syncs from Bitbucket to a Postgres destination. The (top level) source spec section is described in the Source Spec Reference.

kind: source
# Common source-plugin configuration
spec:
  name: bitbucket
  registry: docker
  path: ghcr.io/cloudquery/cq-source-bitbucket:v1.1.0
  tables: ["*"]
  destinations: ["postgresql"]
  # bitbucket-specific configuration
  spec:
    username: "${BITBUCKET_USERNAME}" # required
    password: "${BITBUCKET_PASSWORD}" # required

This example uses environment variable expansion to read the username and password options from BITBUCKET_USERNAME and BITBUCKET_PASSWORD environment variables respectively. You can also hardcode the value in the configuration file, but this is not advised for production settings.

Authentication

In order to fetch information from Bitbucket Cloud, cloudquery needs to authenticate using an app password (opens in a new tab). Follow the instructions on the Bitbucket website and create a read-only token with account:read, projects:read and repositories:read permissions.

Example

kind: source
spec:
  name: bitbucket
  registry: docker
  path: ghcr.io/cloudquery/cq-source-bitbucket:v1.1.0
  tables: ["*"]
  destinations: ["postgresql"]
  # bitbucket-specific configuration
  spec:
    username: "${BITBUCKET_USERNAME}" # required
    password: "${BITBUCKET_PASSWORD}" # required
  ...

Configuration Reference

This is the (nested) spec used by the Bitbucket source plugin: