CircleCI to Bitbucket Pipelines Converter

Convert CircleCI 2.1 config.yml to bitbucket-pipelines.yml. Translates Docker executors, workflows, orb commands, caches, and artifacts.

Migrating from CircleCI to Bitbucket Pipelines

CircleCI workflows become Bitbucket pipeline sections (`default`, `branches.<pattern>`, etc.). Each CircleCI job becomes a Bitbucket step. Cache pairs collapse to step-level `caches:` references, with built-in catalogue matching when possible.

Syntax cheat sheet

ConceptCircleCIBitbucket Pipelines
Executordocker: [{ image }]image
Cache- restore_cache + save_cachecaches: [<built-in>]
Workspacepersist_to_workspace + attach_workspaceartifacts:
Filterfilters: branches: only: [main]pipelines: branches: main:

Gotchas to watch for

  • warning

    Workflow → trigger sections

    CircleCI workflow filters select which jobs run on a given branch. Bitbucket inverts this: each branch pattern is a top-level pipeline section that lists the steps.

  • warning

    Resource classes ignored

    Bitbucket has its own runner sizing. Adjust step `size:` (1x, 2x, etc.) after conversion if needed.

Worked examples

CircleCI Node → Bitbucket

Workflow → default pipeline; explicit cache pair → built-in node cache.

CircleCI
version: 2.1
jobs:
  test:
    docker:
      - image: cimg/node:20.10
    steps:
      - checkout
      - run: npm ci
      - run: npm test
workflows:
  build:
    jobs: [test]
Bitbucket Pipelines
image: cimg/node:20.10
pipelines:
  default:
    - step:
        name: test
        caches: [node]
        script:
          - npm ci
          - npm test

Frequently asked questions

How are CircleCI orbs handled?expand_more

Common orbs map to shell or to a Bitbucket pipe (Slack, AWS S3 deploy). Less common orbs become flagged stubs.

Related Tools