The Buildkite Agent is an open-source toolkit written in Golang for securely running build jobs on any device or network
Go Shell Ruby
Latest commit 11b68fb Jan 16, 2017 @sj26 sj26 committed on GitHub Merge pull request #418 from ButterflyNetwork/double-git-clean
Git clean before and after checkout
Failed to load latest commit information.
.buildkite No need for the first `wait` Dec 22, 2016
agent Git clean before and after checkout Jan 12, 2017
api Added `msgpack` support to the Buildkite API client Nov 23, 2016
clicommand Allow populating args from env Jan 5, 2017
cliconfig Do not export this regexp Jan 5, 2017
envvar Renamed the PipelineParser to be envvar.Interpolate Oct 18, 2016
experiments Experiments is now a global generic package Nov 23, 2016
glob Refactored artifact collection a little. Sep 8, 2015
logger Formatted all the things using goimports - /cc @wolfeidau Jun 10, 2015
mime Improved mime type coverage Sep 19, 2015
packaging Don't break when chkconfig missing Nov 17, 2016
pool Moved pool and glob out of the buildkite package. Jun 2, 2015
process Centralized the lineCallbackWaitGroup to the line scanner go-routine Nov 28, 2016
proctitle Compile linux arm64 agent Mar 9, 2016
retry Added Jitter support directly to the retry gear Oct 3, 2016
scripts Fix escaping bug in Sep 29, 2016
shell Added some debug statements commented out Jun 24, 2016
signalwatcher Added graceful shutdown. Fixes #176 Sep 20, 2015
stdin Rewrote STDIN handing for pipeline upload to support Windows Oct 16, 2015
system Moved the OS version dump gear into a new package. Sep 20, 2015
templates Remove the old bootstrap files May 11, 2016
test/fixtures/artifacts Refactored artifact collection a little. Sep 8, 2015
utils Moved NormalizeFilePath into a utils package. Sep 8, 2015
vendor Moved the location of the vendored msgpack dependency Nov 23, 2016
.envrc-sample Revert "Moved vendor to _vendor so it's ignored by go test." Jul 29, 2015
.gitignore Don't commit the vendor/pkg folder Oct 17, 2015
Dockerfile-github-release Remove Dockerfile and parallelize builds Jul 13, 2016
Gemfile Bundle update May 10, 2016
Gemfile.lock Bundle update May 10, 2016
LICENSE.txt Updated LICENSE to inclide msgpack Nov 23, 2016 Update "maintenance branch" Oct 14, 2016
docker-compose.yml Bump to golang 1.7 Sep 3, 2016 Renamed `Mac OS X` to `macOS` Sep 21, 2016
main.go Added a new "bootstrap" subcommand Oct 13, 2015

Buildkite Agent Build status

Note: This is the 3.0 development branch of the buildkite-agent, and may not contain files or code in the current stable release. To see code or submit PRs for stable agent versions, please use the corresponding maintenance branch: 2.2.x.

The buildkite-agent is a small, reliable, and cross-platform build runner that makes it easy to run automated builds on your own infrastructure. It’s main responsibilities are polling for work, running build jobs, reporting back the status code and output log of the job, and uploading the job's artifacts.

Full documentation is available at

$ buildkite-agent --help

  buildkite-agent <command> [arguments...]

Available commands are:

  start     Starts a Buildkite agent
  artifact  Upload/download artifacts from Buildkite jobs
  meta-data Get/set data from Buildkite jobs
  pipeline  Make changes to the pipeline of the currently running build
  bootstrap Run a Buildkite job locally
  help, h   Shows a list of commands or help for one command

Use "buildkite-agent <command> --help" for more information about a command.


The agents page on Buildkite has personalised instructions for installing the agent with Ubuntu (via apt), Debian (via apt), macOS (via homebrew), Windows and Linux. You can also run the agent via Docker.


To start an agent all you need is your agent token, which you an find on your Agents page within Buildkite.

$ buildkite-agent start --token


With Docker

$ docker-compose run agent bash
root@d854f845511a:/go/src/ go run *.go start --token xxx --debug

Without Docker

# Make sure you have go installed.
brew install go

# Setup your GOPATH
export GOPATH="$HOME/Code/go"
export PATH="$HOME/Code/go/bin:$PATH"

# Checkout the code
go get
cd "$GOPATH/src/"

To test the commands locally:

go run main.go start --debug --token "abc123"


  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request


Copyright (c) 2014-2016 Keith Pitt, Buildkite Pty Ltd. See LICENSE for details.