Skip to main content

Run Vibgrate CLI in Drone CI

Add a Vibgrate drift scan step to a Drone pipeline using a Node container. Learn how to apply a quality gate and surface the DriftScore on every build.

Vibgrate Docs

Vibgrate Help

This guide adds Vibgrate drift scanning to a Drone CI pipeline. It targets teams running the Drone server with Docker or Kubernetes runners.

Prerequisites

  • A .drone.yml pipeline in your repository.
  • A runner that can pull a Node container image.

Pipeline step

kind: pipeline
type: docker
name: default
steps:
  - name: drift-scan
    image: node:22
    commands:
      - npx @vibgrate/cli scan --fail-on error

Drone clones your repository into the workspace before steps run, so npx @vibgrate/cli scan scans the project root.

Quality gate

A non-zero exit code fails the step and the pipeline. Use --fail-on error to gate on error-severity findings, or --drift-budget to gate on the overall DriftScore:

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

Report output

Write a report into the workspace; downstream steps or a plugin can publish it:

npx @vibgrate/cli scan --format markdown --out drift-report.md

Caching

Use a cache plugin or a mounted volume to persist the Vibgrate cache directory across builds for faster repeat scans. See Cache Vibgrate scans in CI.

Related

  • Upload SARIF results to code scanning if your platform ingests SARIF.
  • Push scan results to Vibgrate Cloud from CI for trend tracking.

Related Commands