1. Resources
  2. /
  3. Examples
  4. /
  5. Concurrency Group Pipeline

Buildkite Concurrency Gates with Parallelism Pipeline Example

This repository demonstrates how to use Buildkite concurrency groups and gates to control the flow of a pipeline. It shows how to combine parallelism, step dependencies, and concurrency limits to model gated workflows.

👉 See this pipeline in action: buildkite.com/buildkite/concurrency-group-pipeline-example

See the full Getting Started Guide for step-by-step instructions on how to get this running.

Screenshot of concurrency group example pipeline build page

How it works

This example models a simple gated workflow with concurrency limits and parallelism:

Visual Description

  1. The Running concurrency gate example step prints a quick message to start the pipeline.
  2. The Tests step runs in parallel (up to 5 at once), controlled by a concurrency gate.
  3. When tests finish, the gates for Deploy to Staging and Deploy to Production open. These run independently.
  4. Once both deploy steps complete, Integration Tests run in parallel (up to 3 at once).
  5. After integration tests finish, the Approve Deployment step is triggered.

🔄 Parallelism runs multiple jobs at once. ⛔ Concurrency groups limit how many jobs run at once — even across separate builds.

Think of concurrency like a traffic light: it controls flow, even when you’ve got lots of lanes.

More on this in the Buildkite docs on controlling concurrency.

Pipeline Steps

  • Running concurrency gate example: Just prints a message to kick things off.
  • Tests: Runs up to 5 jobs in parallel, using the tests concurrency group.
  • Deploy to Staging: Waits for tests to finish. Uses the deploy-staging concurrency group.
  • Deploy to Production: Also waits for tests. Uses the deploy-production concurrency group.
  • Integration Tests: Waits for both deploy steps. Runs up to 3 jobs in parallel in the integration-tests group.
  • Approve Deployment: Waits for integration tests, and runs in the approval concurrency group.

Each step uses depends_on and concurrency_group to manage gates and limits.

🧠 Advanced Usage Notes

This setup mixes depends_on with concurrency groups to create gates between phases.

You can:

  • Gate steps across branches or fan-in/fan-out setups
  • Limit job execution globally (not just per pipeline)
  • Create human approval gates at the end of automated flows

Want help modeling a complex pipeline? Reach out to support — we love this stuff.

License

See LICENSE (MIT)

More examples

Start turning complexity into an advantage

Create an account to get started with a 30-day free trial. No credit card required.

Buildkite Pipelines

Platform

  1. Pipelines
  2. Public pipelines
  3. Test Engine
  4. Package Registries
  5. Mobile Delivery Cloud
  6. Pricing

Hosting options

  1. Self-hosted agents
  2. Mac hosted agents
  3. Linux hosted agents

Resources

  1. Docs
  2. Blog
  3. Changelog
  4. Example pipelines
  5. Plugins
  6. Webinars
  7. Case studies
  8. Events
  9. Migration Services
  10. Comparisons

Company

  1. About
  2. Careers
  3. Press
  4. Security
  5. Brand assets
  6. Contact

Solutions

  1. Replace Jenkins
  2. Workflows for AI/ML
  3. Testing at scale
  4. Monorepo mojo
  5. Bazel orchestration

Legal

  1. Terms of Service
  2. Acceptable Use Policy
  3. Privacy Policy
  4. Subprocessors
  5. Service Level Agreement

Support

  1. System status
  2. Forum
© Buildkite Pty Ltd 2025