Docs

Pipelines

Pipelines are defined in TOML. Here is a multi-stage example:

[pipeline]
name = "rust-service"

[pipeline.env]
RUST_BACKTRACE = "full"

[[pipeline.stages]]
name = "validate"

[[pipeline.stages.steps]]
name = "format-check"
command = "cargo fmt --check"

[[pipeline.stages.steps]]
name = "security-audit"
command = "cargo audit"

[[pipeline.stages]]
name = "build"
depends_on = ["validate"]

[[pipeline.stages.steps]]
name = "compile"
command = "cargo build --release"

[[pipeline.stages]]
name = "integration"
depends_on = ["build"]

[[pipeline.stages.steps]]
name = "integration-tests"
command = "cargo test --test integration"
working_directory = "tests"
timeout_seconds = 600

Run contigra plan to see how Contigra resolves this into an execution graph before running it.

Reference

[pipeline]

Key Description
name Human-readable pipeline name.
env Table of environment variables available to every step.

Stages

Key Description
name Stage identifier.
depends_on Stages that must finish before this one starts.

Steps

Key Description
name Step identifier.
command The command to run.
working_directory Directory to run the command in.
timeout_seconds Time limit for the step.
env Environment variables for this step only.

Tips

  • Stages without a depends_on relationship can run side by side. Control how many tasks run at once with contigra run --concurrency.
  • Start from a template with contigra init --template <name>, then edit.