# Bitbucket & Azure DevOps

> **Availability notice:** Self-serve onboarding in [app.membl.io](https://app.membl.io) currently focuses on **GitHub**. Bitbucket and Azure DevOps connections are paused for general self-serve. [Contact us](/contact) if your team needs access.

membl integrates with **Bitbucket (Cloud & Data Center)** and **Azure DevOps (`dev.azure.com`)** when multi-forge access is enabled for your workspace. Keep your existing pipeline YAML files running zero-edit on single-use membl runners or run native `.membl/workflows/*.yml` pipelines.

<Cards>
  <Card title="Multi-Forge Overview" href="/docs/multi-forge">
    Compare drop-in mode vs native .membl/ pipelines across all 7 forges.
  </Card>

  <Card title="Source Control Security" href="/docs/source-control-security">
    Webhook verification, KMS token custody, and egress allowlists.
  </Card>

  <Card title="Pricing & Trial" href="/pricing">
    Per-second billing, 15s minimum, free queue and boot seconds.
  </Card>
</Cards>

## Bitbucket Cloud & Data Center

### Connecting Bitbucket

1. Open **Settings -> Connections -> Source Control** and choose **Bitbucket**.
2. Authorize **Bitbucket Cloud** via OAuth, or enter your **Bitbucket Data Center** HTTPS base URL and token (manual or 1Password `op://` reference).
3. membl registers signed webhook delivery to `POST /api/bitbucket/webhook` and adds your verified Data Center hostname to your workspace egress allowlist automatically.

### Zero-edit `bitbucket-pipelines.yml`

Target membl self-hosted Linux runner labels in `bitbucket-pipelines.yml`. Every job runs in a fresh single-use Linux x64 sandbox (2 or 4 vCPU, 8 GB RAM) and reports back through the Bitbucket Commit Build Status API:

```yaml
pipelines:
  default:
    - step:
        name: Test & Build
        runs-on:
          - self.hosted
          - linux
          - membl
        script:
          - pnpm install --frozen-lockfile
          - pnpm test
```

### Native `.membl/workflows/*.yml` on Bitbucket

Repositories with `.membl/workflows/ci.yml` can also run declarative membl pipelines directly on Bitbucket webhook events, posting Commit Build Status results on every push and pull request.

***

## Azure DevOps (`dev.azure.com`)

### Connecting Azure DevOps

1. Sign in with **Microsoft** or open **Settings -> Connections -> Source Control** and choose **Azure DevOps**.
2. Link your `dev.azure.com` organization via OAuth or a scoped Personal Access Token (`op://` import supported).
3. membl registers webhook notifications to `POST /api/azdo/webhook` and exposes an ephemeral single-use agent pool named `membl`.

### Zero-edit `azure-pipelines.yml`

Point `pool:` at `membl` in `azure-pipelines.yml`. Each triggered job registers an ephemeral single-use `--once` agent inside a clean Linux x64 sandbox, executes the pipeline steps, reports Azure Repos PR Status back to Azure DevOps, and destroys the sandbox immediately on exit:

```yaml
trigger:
  - main

pool: membl

steps:
  - script: |
      pnpm install --frozen-lockfile
      pnpm test
    displayName: "Install and run tests"
```

### Native `.membl/workflows/*.yml` on Azure DevOps

You can also place `.membl/workflows/ci.yml` in an Azure Repos repository to use declarative cache presets, timing-based test sharding, and `type: gate` status checks reported straight to Azure Repos PRs.

## Verify your setup

Click **Test Connection & Verify Webhook** in Source Control settings after connecting either forge, or open the [cost calculator](/calculator) to compare monthly CI spend.

