Skip to content
GitHubBlueskydev.toRSS

09CLI reference

vx pipeline

vx pipeline <name> runs a pipeline of .vx/workspace.ts: its tasks in every project that declares them, under the vx run flags it saves (schema.md § Pipelines). Each CI job names one.

Terminal window
vx pipeline NAME [OPTIONS]

OPTIONS are vx run’s but --all: a pipeline runs every project.

.vx/workspace.ts
import { defineWorkspace } from '@vzn/vx/config'
export default defineWorkspace({
pipelines: {
pr: { tasks: ['lint', 'test'], affected: true },
main: { tasks: ['lint', 'test', 'build'] },
},
})
Terminal window
vx pipeline pr # lint and test what the change reaches
vx pipeline main # every project
vx pipeline main --dry # the plan, nothing run
vx pipeline main --filter web # main's tasks in web alone

A second vx pipeline main with nothing changed restores all six tasks from the cache:

Terminal window
Summary vx 0.0.0
projects ▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰
2 in run · 2 total
tasks ▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰
6 success · 6 total
cache ▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰▰
local 6✓
info 4 workers · local cache · run 01a20a07-641f-7300-92ab-e3cb8be0761e
time 21ms

Each key of a pipeline is one of these flags in camelCase, and a flag typed here beats it: --filter, --affected, --exclude-dependencies, --concurrency, --schedule, --branch, --timeout, --retries, --fail-fast, --no-cache, --force, --cache-policy, --cache-dir, --cache-download, --cache-concurrency-download, --cache-concurrency-upload, --cache-concurrency-restore, --output-logs, --verbosity, --dry, --format, --profile. A flag’s VX_* variable beats the key too. A typed --cache-policy (or VX_CACHE_POLICY) also drops a saved noCache and force, and a typed --force a saved noCache. A saved cacheDir or profile stands from the workspace root; a typed one, from the current directory.

A pipeline’s env is set for vx and its plugins before they start, and every task reads it as unset. Nothing goes after --: forwarded args are for one task in one project.

  • 0 — every task passed, or --dry planned them.
  • 1 — a task failed; or no name, a name no pipeline has (with the nearest one as a fix), a task name or --all typed, or a refused flag (VX_E_USAGE); or a saved cachePolicy, or an env entry setting a VX_* variable, the run would refuse, naming that key (VX_E_CONFIG). A refusal that names a saved flag adds the key that holds it (--affected is \pipelines.pr.affected``).
Turborepo, Nx and other product names are trademarks of their owners. vx is not affiliated with or endorsed by them.