Skip to main content
The wait command is designed for CI/CD pipelines and container orchestration (like Kubernetes). It blocks the execution of a follow-up command until all defined Preflight probes pass.

Usage

dotset preflight wait [options] -- <command>

Options

OptionDescriptionDefault
-s, --schema <path>Path to the schema file.preflight.yaml
-e, --env <name>Environment to validatedefault
-t, --timeout <ms>Maximum time to wait before failing60000 (60s)
-i, --interval <ms>How often to poll the infrastructure2000 (2s)
-q, --quietSuppress polling status messages-

Example: Database Gating

Ensure your database and cache are ready before starting your application:
dotset preflight wait -- npm start
Preflight will:
  1. Scan your schema for connectivity probes (postgres, redis, etc.).
  2. Poll those services every 2 seconds.
  3. If all pass, it will spawn npm start.
  4. If it fails to connect within 60 seconds, it will exit with code 1 and block the app from starting.

Example: CI Integration

Use wait in your CI test step to ensure the test database is fully booted before running tests:
- name: Run Tests
  run: dotset preflight wait -t 120000 -- npm test