Go package provides a runtime for pipeline execution
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
engine rollback change to temp dir Jan 18, 2019
runtime add unit test for single line with LF Jan 2, 2019
samples added kubernetes engine Oct 24, 2018
.drone.yml bump go version Dec 4, 2018
.gitignore fix docker networking on windows Oct 9, 2018
BUILDING initial commit Sep 30, 2017
Gopkg.lock enable dag Dec 9, 2018
Gopkg.toml update deps Oct 8, 2018
LICENSE initial commit Sep 30, 2017
README.md added kubernetes engine Oct 24, 2018
main.go enable node assignment for k8s Dec 5, 2018


The drone runtime package implements the execution model for container-based pipelines. It is effectively a lightweight container orchestration engine optimized for pipelines.

Definition File

The runtime package accepts a pipeline definition file as input, which is a simple json file. This file is not intended to be read or written by humans. It is considered an intermediate representation, and should be generated by a computer program from more user-friendly formats such a yaml.

Example hello world definition file:

	"metadata": {
		"uid": "uid_AOTCIPBf3XdTFs2j",
		"namespace": "ns_JVzesGoyteu5koZK",
		"name": "test_hello_world"
	"steps": [
			"metadata": {
				"uid": "uid_8a7IJsL9zSJCCchd",
				"namespace": "ns_JVzesGoyteu5koZK",
				"name": "greetings"
			"docker": {
				"args": [
					"echo hello world"
				"command": [
				"image": "alpine:3.6",
				"pull_policy": "default"
	"docker": {}

Local Testing

The runtime package includes a simple command line utility allowing you to test pipeline execution locally. You should use this for local development and testing.

The runtime package includes sample definition files that you can safely execute on any machine with Docker installed. These sample files should be used for research and testing purposes.

Example commands:

drone-runtime samples/1_hello_world.json
drone-runtime samples/2_on_success.json
drone-runtime samples/3_on_failure.json
drone-runtime samples/4_volume_host.json
drone-runtime samples/5_volume_temp.json
drone-runtime samples/6_redis.json
drone-runtime samples/7_redis_multi.json
drone-runtime samples/8_postgres.json
drone-runtime samples/9_working_dir.json
drone-runtime samples/10_docker.json

Example command tests docker login:

drone-runtime --config=path/to/config.json samples/11_requires_auth.json

Kubernetes Engines

The default runtime engine targets Docker, however, there is an experimental runtime engine that targets Kubernetes. Pipeline containers are launched as Pods using the Kubernetes API.

drone-runtime \
  --kube-url=https://localhost:6443 \
  --kube-config=~/.kube/config \