bk build compare compares final attempts across builds
Introduced 2026-10-20 · score 0.99
HOW TO USE IT
When debugging a pipeline, run `bk build compare` with the target selector and optionally `--pipeline` and `--baseline`; inspect JSON, YAML, or text for final-attempt changes and investigation links.
bk build compare 123 --pipeline my-pipeline --jsonbk build compare acme/my-pipeline/123 --baseline 120 --textbk build compare https://buildkite.com/acme/my-pipeline/builds/123 --yamlWHY THIS HELPS
Compare job outcomes and timings between a target build and a baseline while debugging a Buildkite pipeline.
BEFORE THIS CHANGE
Manually inspect two builds to compare step outcomes, retry counts, and timings.
REQUIREMENTS AND LIMITATIONS
- Version: v3.64.2
- <build-number> (required): Target build number, org/pipeline/number, or Buildkite build URL.
- --pipeline: Pipeline slug or org/pipeline; inferred from configuration or repository if omitted.
- --baseline: Baseline build number in the same pipeline; otherwise an earlier passed build on the same branch. Explicit baseline must be a different positive number; it may be newer, failed, or on another branch.
- --json / --yaml / --text: Select JSON, YAML, or text output format.
- --output: Output format: json, yaml, or text.
- Prerequisite: Requires `read_builds`.
- Requires `read_builds`.
- JSON/YAML never prompts for pipeline selection; specify `--pipeline` when inference is ambiguous.
- `--baseline` must be a different positive build number in the same pipeline; it may be newer, failed, or on another branch, with cross-branch comparisons warning.
- Automatic baseline search considers at most five pages or 500 candidates and requires a lower-numbered, strictly earlier-created build on the exact target branch that is currently passed.
- Missing branch or creation time, or no eligible baseline, is an error; supply `--baseline`.
- Missing or denied builds, failed pages, or inventories exceeding ten pages or 1000 jobs per build fail with no partial output.
- Only final attempts (`retried=false`), including running attempts, are compared.
- Name-based fallback matches are heuristic; duplicate identities leave affected jobs unmatched; keys never match names.
- No logs are fetched, and comparison does not establish causality or retry safety.
FIRST-PARTY EVIDENCE
- https://github.com/buildkite/cli/releases/tag/v3.64.2
- https://github.com/buildkite/cli/pull/1049
- https://buildkite.com/docs/platform/cli/reference/build
Check the installed version and the source before using it. Entry JSON