OXYGENHUB

Pipelines

Andy McCall edited this page · 1 revision

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"
}
FieldWhat it does
depends-onRuns after these jobs pass
scopeThe paths the job reads; a change outside them keeps the last result
mountScratch space: ephemeral://disk or ephemeral://tmpfs
envEnvironment variables for the job
runs-onRunner labels the job needs
onWhat starts it: push, tag, manual, schedule (cron, UTC)
secretA secret from the hub, mounted as a file
outputArtifacts 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) or junit (JUnit XML) is read by the hub.
  • A report is a directory. See Reports.