Skip to main content

Run Vibgrate CLI on Buildkite

Add a Vibgrate drift scan step to a Buildkite pipeline running on self-hosted agents. Learn how to gate builds and upload the report as a Buildkite artifact.

Vibgrate Docs

Vibgrate Help

This guide runs Vibgrate drift scanning on Buildkite. It is for teams using self-hosted Buildkite agents, where you control the host environment.

Prerequisites

  • A Buildkite agent with Node.js 18+ installed, or a step that runs inside a Node container via the Docker plugin.
  • The pipeline checks out your repository.

Pipeline step

steps:
  - label: ':mag: Vibgrate drift scan'
    command: npx @vibgrate/cli scan --fail-on error

Buildkite checks out into the agent's build path, so npx @vibgrate/cli scan scans the project root.

Gating the build

A non-zero exit code fails the step. Use --fail-on error for severity gating or --drift-budget for a numeric budget:

npx @vibgrate/cli scan --drift-budget 60

Uploading the report as an artifact

Write the report and use buildkite-agent artifact upload:

  - label: 'Drift report'
    command: |
      npx @vibgrate/cli scan --format markdown --out drift-report.md
      buildkite-agent artifact upload drift-report.md

Caching

Because self-hosted agents are long-lived, the Vibgrate cache typically persists between builds automatically. If you use ephemeral agents, mount a shared cache volume.

Related

  • Run scans on changed files only to keep PR steps fast.
  • Push scan results to Vibgrate Cloud from CI for org trends.

Related Commands