Skip to content

Build States

Every build in Oore CI transitions through a defined set of states from creation to completion.

States

StateDescription
queuedBuild created, waiting for a runner to claim it
scheduledAssigned to a runner's queue, waiting to start execution
assignedRunner has claimed the job via heartbeat/claim cycle
runningBuild commands are executing on the runner
succeededAll build commands completed with exit code 0
failedA build command returned a non-zero exit code
canceledBuild was canceled by a user
timed_outBuild exceeded the maximum execution time
expiredBuild sat in the queue too long without being claimed

Transitions

queued → scheduled → assigned → running → succeeded
                                       → failed
                                       → timed_out
queued → expired
queued → canceled
running → canceled

Normal flow

  1. queued — A build is created (manual, webhook, or API trigger)
  2. scheduled — The scheduler assigns the build to a runner
  3. assigned — The runner claims the job via POST /v1/runners/{runner_id}/claim
  4. running — The runner starts executing build commands and streaming logs
  5. succeeded or failed — Build commands finish

Terminal states

Once a build reaches any of these states, it cannot transition further:

  • succeeded
  • failed
  • canceled
  • timed_out
  • expired

Cancelation

A build can be canceled from queued or running state:

bash
curl -X POST http://127.0.0.1:8787/v1/builds/{build_id}/cancel \
  -H "Authorization: Bearer <session_token>"

Canceling an already-terminal build has no effect.

Build timing fields

FieldSet when
queued_atBuild created
started_atRunner begins execution (transition to running)
finished_atBuild reaches a terminal state

Runner interaction

The runner lifecycle for a build:

  1. Runner sends heartbeat: POST /v1/runners/{runner_id}/heartbeat
  2. Runner claims a job: POST /v1/runners/{runner_id}/claim
  3. Runner streams logs: POST /v1/runners/{runner_id}/jobs/{job_id}/logs
  4. Runner reports completion: POST /v1/runners/{runner_id}/jobs/{job_id}/status

Self-hosted mobile CI, built for Flutter.