Drone adds support for Bitbucket Pipelines

Today Drone.io, the container-native CI/CD platform, is announcing support for the Bitbucket Pipeline configuration format. This means Drone can directly execute your bitbucket-pipelines.yml configuration file, providing portability across CI/CD environments.

With this announcement, Drone makes it easier for teams to move workloads from Bitbucket Cloud to an on-premise Bitbucket Server environment, Atlassian’s Enterprise. Drone is the missing CI/CD system for Bitbucket Server.

Getting Started

Drone is able to convert a standard Bitbucket Pipeline configuration file to the Drone configuration file format. Below is an example Pipeline for a node project that will install, test and build a JavaScript application.

pipelines:
  default:
    - step:
        name: Build and test
        image: node:8.5.0
        script:
          - npm install
          - npm test
          - npm build

definitions:
  services:
    postgres:
      image: postgres:9.6.4

We can use the Drone command line utility to convert the Bitbucket Pipeline configuration to a native Drone Pipeline configuration.

$ drone convert bitbucket-pipelines.yml

---
kind: pipeline
name: default

platform:
  os: linux
  arch: amd64

steps:
- name: Build and test
  image: node:8.5.0
  commands:
  - npm install
  - npm test
  - npm build

services:
- name: postgres
  image: postgres:9.6.4

...

In the above example we manually converted the Bitbucket Pipeline using the Drone command line tools. Drone is also capable of automatic conversion. You can point the Drone server to your Bitbucket Pipeline configuration file for automatic runtime conversion:

change the configuration path

Compatibility Overview

Our goal is to conform as closely as possible to the Bitbucket Pipeline implementation as outlined in the specification. There are, however, some underlying architectural differences that prevent full conformance when converting Bitbucket Pipelines to Drone Pipelines.

Filesystem Compatibility

Bitbucket steps have ephemeral, isolated filesystems. If a step generates artifacts that need to be shared with subsequent steps it must be explicitly configured (example below). Drone, on the other hand, provides a shared filesystem for all steps in the Pipeline and does not require explicit artifact caching and restoring.

Example Bitbucket artifacts:

pipelines:
  default:
    - step:
        name: Build and test
        image: node:8.5.0
        script:
          - npm install
          - npm test
          - npm build
        artifacts:
          - dist/**
          - reports/*.txt

Service Compatibility

Bitbucket service containers are accessible by localhost. Drone service containers are accessible using a hostname that corresponds to the name of the service (i.e. postgres).

Caching Compatibility

Bitbucket provides native syntax in the yaml for caching dependencies. Drone supports caching and restoring dependencies using plugins, and defining explicit cache and restore steps. When Drone converts a bitbucket-pipelines.yml file it does not attempt to emulate caching.

Example Bitbucket cache syntax:

pipelines:
  default:
    - step:
        caches:
          - node
        script:
          - npm install
          - npm test

Example Drone cache syntax:

kind: pipeline
name: default

steps:
- name: restore
  image: plugins/s3-cache
  settings:
    restore: true
    mount:
      - node_modules

- name: build
  image: node
  commands:
    - npm install
    - npm test

- name: rebuild
  image: plugins/s3-cache
  settings:
    rebuild: true
    mount:
      - node_modules

Commitment to Portability

We released multi-cloud, multi-architecture and multi-machine capabilities with the Drone 1.0 release candidate. Drone will continue to add capabilities that make code simple and easy to deploy across teams, no matter your git management tool, cloud or operating system. Stay tuned for additional support announcements in the coming weeks.


Drone.io has been at the forefront of how to deploy with containers and the first to deliver a container CI/CD model. Drone has a robust ecosystem of plug-ins such as Kubernetes, Helm, GitHub and more, to help developers with their pipelines. With 17,000 GitHub stars and a passionate community, Drone is empowering developers to quickly fix bugs and deliver new applications to market faster. Drone is pluggable, repeatable and portable by nature, putting the power of deployment in developers hands. Follow us on Twitter @droneio.