Skip to content

DX: Pipeline YAML Validation inline from TUI #74

Description

@alexhraber

Problem

The Buildkite CLI can validate pipeline YAML files (bk pipeline validate), but builddeck provides no way to quickly check if a .buildkite/pipeline.yml is valid. Users who edit their pipeline config have to switch to the CLI or push and wait for Buildkite to reject it.

Proposed Feature

Add a pipeline validation action accessible from the pipelines list pane. When a pipeline is highlighted, pressing a key (e.g. v) reads the local .buildkite/pipeline.yml (if one exists relative to CWD or the repo root) and validates it against the Buildkite API.

UX

  1. Focus left pane (pipelines list)
  2. Highlight a pipeline
  3. Press v
  4. If .buildkite/pipeline.yml is found:
    • Reads file content
    • Sends to Buildkite validation endpoint
    • Shows result in status bar: "Pipeline valid ✓" or inline errors
  5. If no local pipeline file found:
    • Status bar shows: "No .buildkite/pipeline.yml found in repo root"

Inline Error Display for Validation Failures

Status: Pipeline validation failed:
  - Step ":test": command field is required
  - Step ":deploy": depends_on references unknown step "lint"

Why this fits a TUI

  • Pipeline validation is a quick check you do while iterating on CI config
  • The TUI already lists your pipelines — validating the config for the current pipeline is one key away
  • Faster than bk pipeline validate because the TUI already knows your org and pipeline context

References

  • bk pipeline validate in buildkite/cli
  • Buildkite REST API: GET /v2/organizations/{org}/pipelines/{pipeline}/validate

Acceptance

  • v key on a selected pipeline triggers validation
  • Auto-discovers .buildkite/pipeline.yml from CWD or repo root
  • POSTs content to Buildkite validation endpoint
  • Shows "valid" or detailed error messages in status bar
  • Handles "no pipeline file found" gracefully
  • Loading state while API processes
  • Also works from the builds pane (validates the pipeline of the selected build)

Future

  • Watch mode: V (shift) watches the file for changes and re-validates on save

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions