The Buildkite Agent is an open source tool for securely running build and automation tasks on your own infrastructure. And after 41 betas and almost a year in development, I’m excited to announce that v2 of the agent has finally hit stable!
Thanks so much to everyone who tested, contributed, and filed issues during the v2 betas. We couldn’t have done it without you ❤️
So what’s new in v2?
Elastically scale your build agents 📦
You can now configure the agent using environment variables (and config files), allowing you to create reusable agent machine images (using Ansible, Packer, AMIs, Docker, etc) and scale them using the same best practices you apply to your production machines.
The build pipeline has been updated to support key/value based pattern matching which you can use to segregate agents based on capability (e.g. docker=1.7
, xcode7=true
), by queue (e.g. queue=deploy
), or any way you wish.
The Buildkite API and webhooks have also been updated, allowing you to monitor your agent cluster (e.g. feeding build stats into AWS CloudWatch) and dynamically scale your build capacity for maximum performance and minimum cost.
Full Docker support
Built-in support for running CI builds using Docker and Docker Compose means you can easily create your own Docker-powered build cluster capable of running any tool or environment a project needs. To get started you add a Docker and/or Docker Compose file to your projects, add the BUILDKITE_DOCKER
environment variable to your pipeline step, and the agent will do the heavy lifting to build your image and run the command.
If you outgrow the built-in Docker support, or for example you want to experiment with an alternative container system, you can easily roll your own scripts as you need.
The agent is also available on Docker Hub so you can now docker run buildkite/agent
Agent and project hooks 🌀
You can now customize the entire build lifecycle with global and per-project build hooks. Hooks are just executable scripts we detect and invoke at different stages in a build, and they allow you to DRY pipeline code between projects, customize built-in behaviors, and add your own speed optimizations.
For example, an environment
hook could read and expose secrets from a secret management system such as Vault, a checkout
hook could override the standard checkout behavior to copy from a local cache, and a command
hook could override the standard command execution and run the command inside a container.
New installer packages
Easily install and update the agent using new installer packages for Ubuntu, Debian, RPM (and CentOS), Mac OS X, Windows and Docker.
Build queues 🚗 🚙 🚕
Lock down agents to a specific job queue, perfect for creating a sequential queue of infrastructure change deployments, isolating privileged deployment jobs, or simply experimenting with new agent setups.
Hundreds of small improvements
There are hundreds of small improvements to the agent, including: agent priorities (higher priority agents get preference), much improved network failure resilience, and a new beta buildkite-agent pipeline upload
command for reading your build pipeline from a checked-in JSON file in your projects (and you can even generate it from a script and pipe it into stdin).
All new documentation 📖
We’ve updated our agent documentation with information on configuration, hooks, agent meta-data, prioritization, and security.
We’ve also written two new guides on how to parallelize builds and how to containerize builds using Docker.
Getting started 🚀
To get started on a new machine follow one of the installation guides, or our upgrade instructions for upgrading earlier agent versions.