Skip to main content

Schedule Recurring Drift Reporting

Combine a DSN token with a scheduled CI job to run vg scan --push and vg report automatically, keeping dashboard trends and report artifacts current.

Difficulty
Intermediate
Duration
20 minutes
Steps
5

Drift accumulates whether or not anyone is watching, so the best reporting runs on a schedule. By combining a DSN token with a scheduled CI job, you can scan, push to Vibgrate Cloud, and generate a report automatically — for example, every night. This tutorial sets up recurring drift reporting.

Prerequisites

  • The Vibgrate CLI installed (npm i -g @vibgrate/cli)
  • A scheduler such as cron or GitHub Actions
  • A Vibgrate Cloud workspace

Steps

1. Create a DSN for automation

vg dsn create

Store the resulting token as a secret (for example, VIBGRATE_DSN) so the scheduled job can authenticate without a browser.

2. Write the scan-and-push command

The core of the job is a single command that scans and uploads.

vg scan --push --dsn "$VIBGRATE_DSN"

3. Add a scheduled CI workflow

Use your scheduler to run the command on an interval. In GitHub Actions, a schedule trigger with a cron expression runs it nightly; on a server, a crontab entry works the same way. Each run records a fresh DriftScore.

4. Generate a report on each run

After the scan, produce a report artifact for archiving or notification.

vg report --format markdown --out drift-report.md

Upload drift-report.md as a build artifact or attach it to a notification.

5. Verify the schedule fires

Check the scheduler's run history after the first interval and confirm a new dashboard entry and report artifact appeared.

Verification

Each scheduled run should exit 0, add a point to your Vibgrate Cloud trend, and produce a report file. If runs are missing, check the scheduler's cron expression and that the DSN secret is set.

Next Steps

  • Turn the recurring data into a leadership update: "Generate an Executive Drift Summary".
  • Share each run with teammates: "Share Drift Results with Your Team".

Prerequisites

  • Vibgrate CLI installed
  • A DSN token (vg dsn create)
  • A scheduler such as cron or GitHub Actions

Steps

  • 1
    Create a DSN for automation
  • 2
    Write the scan-and-push command
  • 3
    Add a scheduled CI workflow
  • 4
    Generate a report on each run
  • 5
    Verify the schedule fires

Category

Vibgrate