Skip to content

Pipeline YAML Schema

Top-level fields

FieldTypeRequiredDescription
namestringyesPipeline name — used as the run command
descriptionstringnoShort description shown by pipe list
varsmap[string]stringnoUser-defined variables (see Variables)
steps[]StepyesOrdered list of steps

Step fields

FieldTypeRequiredDefaultDescription
idstringyesUnique step identifier
runstring | []string | []SubRunyesCommand(s) to execute (see run modes)
depends_onstring | []stringno[]Step ID(s) that must complete first
sensitiveboolnofalseExclude output from state files; always re-execute on resume
retryintno0Number of retries on failure
cachebool | CacheConfignofalseCache successful results (see Caching)

SubRun fields

Used inside a run list when each item is a mapping:

FieldTypeRequiredDefaultDescription
idstringyesSub-run identifier (combined with step ID for env var: PIPE_<STEP>_<SUBRUN>)
runstringyesCommand to execute
sensitiveboolnofalseExclude this sub-run’s output from state files

CacheConfig fields

Used when cache is a mapping instead of true:

FieldTypeRequiredDescription
expireAfterstringyesExpiry duration or wall-clock time

Expiry formats

FormatExampleDescription
Go duration30s, 10m, 1h, 24hRelative duration from cache time
Wall-clock time18:10 UTC, 15:00Re-run after this time of day

DependsOn forms

The depends_on field accepts two YAML forms:

# Scalar — single dependency
depends_on: "build"
# Sequence — multiple dependencies
depends_on:
- "lint"
- "test"

Run forms

The run field accepts three YAML forms:

# Scalar — single command (output captured as PIPE_<STEP_ID>)
run: "echo hello"
# Sequence of strings — parallel commands (output NOT captured)
run:
- "go vet ./..."
- "golangci-lint run"
# Sequence of mappings — parallel named sub-runs (output captured per sub-run)
run:
- id: linux
run: "GOOS=linux go build -o dist/linux ."
- id: darwin
run: "GOOS=darwin go build -o dist/darwin ."

Full example

name: release
description: "Build and release the project"
vars:
registry: "ghcr.io/myorg"
steps:
- id: get-version
run: "git describe --tags --abbrev=0"
- id: checks
run:
- "go vet ./..."
- "go test -race ./..."
- id: build
run:
- id: linux
run: "GOOS=linux go build -ldflags '-X main.version=$PIPE_GET_VERSION' -o dist/linux ."
- id: darwin
run: "GOOS=darwin go build -ldflags '-X main.version=$PIPE_GET_VERSION' -o dist/darwin ."
depends_on: "checks"
- id: push
run: "docker push $PIPE_VAR_REGISTRY/app:$PIPE_GET_VERSION"
depends_on: "build"
retry: 2