Skip to main content

Run Vibgrate CLI in Argo Workflows

Run Vibgrate drift scanning as a step in an Argo Workflows template on Kubernetes. Learn how to source the repository, gate the run, and capture the report.

Vibgrate Docs

Vibgrate Help

This guide runs Vibgrate drift scanning inside an Argo Workflows template on Kubernetes. It targets platform teams running CI as Kubernetes-native workflows.

Prerequisites

  • Argo Workflows installed on a cluster.
  • A way to source your repository into the step, such as a git artifact input or an init container.

Workflow template

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: vibgrate-drift-
spec:
  entrypoint: drift
  templates:
    - name: drift
      container:
        image: node:22
        command: [sh, -c]
        args: ['npx @vibgrate/cli scan --fail-on error']

Ensure your repository is mounted as the working directory so npx @vibgrate/cli scan scans the project root.

Gating the workflow

A non-zero exit code marks the node, and therefore the workflow, as failed. Use --fail-on error for severity gating, or --drift-budget to gate on the overall DriftScore:

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

Capturing the report

Write the report to a path declared as an output artifact so Argo archives it:

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

Caching

Mount a persistent volume claim for the Vibgrate cache directory so repeat scans reuse prior work. See Cache Vibgrate scans in CI.

Related

  • Monorepo matrix scans map naturally to Argo workflow fan-out.
  • Push scan results to Vibgrate Cloud from CI for visibility.

Related Commands