feat(ci): run CI pipelines on Cloudflare containers, started by pushes
Add CI/CD as a refs feature. A repo puts its pipeline in .refs/ci.yml. A push to a branch that the pipeline names starts a run. Each job runs in its own container. RunHub holds the run state and the masked logs. Jobs in an environment wait for a person to approve them. - apps/ci: the config parser, the job graph, the run state machine, trust, environment gates, the secret box and the log masker (pure, tested). - apps/ci/runtime and workers/ci: the refs-ci Worker. It has the RunPipeline Workflow, the RunHub and JobRunner Durable Objects, the base and node images, an operator API, and the CiService entry for pushes. - The main Worker calls CiService after it processes a push. - Migration 0034 adds the ci_* tables. RunHub copies the run state to ci_runs. Not done yet: secrets in jobs, pull request runs, the per-namespace job limit, custom and Android images, ci_jobs rows, and the UI.
1 decision
A decision record here could not be read. Line 8: expected "name: value" under rejected.
A decision record here could not be read. Line 8: expected "name: value" under rejected.
A decision record here could not be read. Line 9: expected "name: value" under rejected.
A decision record here could not be read. Line 7: expected "name: value" under rejected.
RunHub.advance also returns approved jobs that are queued, and Run.advance does not.
Why
- Only the Workflow calls RunHub.advance, and only when no job is in flight
- Run.advance keeps its rule that it never returns a queued job twice
Paths considered
- Chosen
- Return every queued job from Run.advance
- Run.advanceIt breaks the tested rule for callers that call it while jobs run.
Touches
run-hub.ts