Pipelines
A pipeline is .flow/pipeline.kdl (KDL). The full reference is the
specification, §3. This page covers what you'll use
most.
Sandboxes
sandbox "rust" {
runtime "microvm" // "microvm" or "syscall"
rootfs "cas://blob/…" // the image, by hash
memory-limit "8GiB"
cpu-limit 4
network "loopback" // "isolated", "loopback" or "egress"
env {
CARGO_INCREMENTAL "0"
}
}
Jobs
job "test" {
sandbox "rust"
depends-on "fmt"
scope "crates/**" "Cargo.*"
mount {
source "ephemeral://disk"
target "/src/target"
size "16GiB"
}
exec "cargo" "test" "--workspace" "--locked"
}
| Field | What it does |
|---|---|
depends-on | Runs after these jobs pass |
scope | The paths the job reads; a change outside them keeps the last result |
mount | Scratch space: ephemeral://disk or ephemeral://tmpfs |
env | Environment variables for the job |
runs-on | Runner labels the job needs |
on | What starts it: push, tag, manual, schedule (cron, UTC) |
secret | A secret from the hub, mounted as a file |
output | Artifacts and reports to keep |
Outputs
output {
artifact "tool" {
path "/src/target/release/tool"
}
artifact "junit" {
path "/src/target/junit.xml"
when "always" // keep it from a failing job too
}
report "performance" {
path "/src/out/report"
when "always"
}
}
- An artifact named
coverage(LCOV) orjunit(JUnit XML) is read by the hub. - A
reportis a directory. See Reports.