Buildkite Agent job queues

Each pipeline has the ability to separate jobs using queues. This allows you to isolate a set of jobs and/or agents, making sure they only run jobs that are intended to be assigned to them.

Common use cases for queues include deployment agents, and pools of agents for specific pipelines or teams.

The default queue

If you don't configure a queue for your agent by setting an agent tag of queue=my_example_queue it will accept jobs from the default queue as if you had set queue=default.

Setting an agent's queue

An agent's queue is configured using an agent tag, which can be changed using the command line flag, an environment variable, or the config file.

Agents can listen on a single queue or on multiple queues. You can add as many extra queue tags as are required.

In the below example using the --tags flag of the buildkite-agent start command, two queues are specified which will result in the agent listening on both the building and testing queues:

buildkite-agent start --tags "queue=building,queue=testing"
Screenshot of an agent's tags showing both building and testing queues

🚧 Configuring cluster queues

If you have Clusters enabled and are configuring your agent with a cluster queue, you need to create the cluster queue first. See Set up a cluster queue for more information.

Targeting a queue

Target specific queues using the agents attribute on your pipeline steps.

For example, the following build step matches only agents running on the deploy queue (and ignores the agents running the default queue):

  - command:
      queue: "deploy"