Run a pipeline on any work item
scarn work --work-item-id <id>Running a pipeline takes two things: a queued run on the work item, and a worker to execute it. The command above is the second half: it adds the project to this machine’s background worker, which only claims steps already queued for that item. With nothing queued, the worker just polls. Queue the run first.
Queue it from the dashboard
Section titled “Queue it from the dashboard”- Open your project in the dashboard and go to the Work Items tab.
- Open the work item and select the Pipeline executions button at the top right. A drawer lists the item’s runs so far.
- Select New, pick the pipeline, and select Create.
New is disabled until the project has a pushed pipeline. Once the run is
queued, start a worker with the command above, or plain scarn work to
take any queued work in the project.
Queue it from the CLI
Section titled “Queue it from the CLI”There is no standalone command that queues a run. The closest is the run offer at the end of a design session: run
scarn pipelines design --work-item-id <id>and when the session exits cleanly, it asks whether to run the pipeline the
default automation routes to on that item. Say yes and it queues the run and hands it to the
background worker, starting the worker if it isn’t running. Say no and it prints the scarn work … --work-item-id
command; nothing is queued, so queue the run from the dashboard before you use
it. See The run offer for every case
where no offer appears.
The worker
Section titled “The worker”scarn work adds the project to this machine’s background worker and
returns. The worker keeps claiming steps, because later steps queue as
earlier ones advance, until you run scarn worker remove <owner/slug> or
scarn worker stop. --work-item-id scopes it to one item. To poll once
in the foreground and exit, use
scarn worker start --foreground --once --work-item-id <id>. Every flag:
scarn work. To run
several workers, see Running Workers.
Why a new item doesn’t start by itself
Section titled “Why a new item doesn’t start by itself”The default automation
starts a pipeline when a work item becomes ready: it arrives, its last blocker
closes, or it reopens. It is published disabled, so nothing starts until you
run scarn automations enable default. Items that were already ready before
then, including the one you designed the pipeline around, don’t fire again;
queue a run for them as above.