OXYGENHUB

Running Locally

Andy McCall edited this page · 1 revision

Running Locally

One of the most common CI complaints is that you can only test a pipeline by pushing it. With OxygenFlow you run it on your own machine first:

flow run                              # every job of .flow/pipeline.kdl
flow run clippy test                  # these jobs, and what they depend on
flow run --var RELEASE=1              # a variable, as the hub's settings would give it
flow run --secret DEPLOY_KEY=…        # a secret a job's secret block names
flow run --timeout 30                 # minutes before a job is stopped
  • Same sandboxes as CI. Each job runs in the tier your machine offers. Run flow tiers to see which, and why the others can't run.
  • This directory's files, as they are now. Nothing is committed or pushed.
  • Secrets are mounted as files inside the job, never placed in its environment, just as on the hub.

Images

A job's sandbox names its image by hash. Locally, the image has to be in your Flow home (~/.local/share/flow, or $FLOW_HOME):

flow rootfs import image.tar    # prints cas://blob/…
flow rootfs list

With Jetstream, the first local run will fetch a pinned image by hash instead.

Why this matters

With Jetstream, flow run becomes an in-process Jetstream with one local runner: the same placement and the same code path as CI. Passing locally means passing in CI.