Documentation
¶
Overview ¶
cork-build is a cork deployment's build plane: the half of corkd that CORK_BUILD_PLANE=external leaves out (issue #18). It reads the schema files an event is defined by, scans the challenge directory, builds and pushes every build those schemas name, and hands the finished builds to the orchestrator over PUT /challenges/<id>.
It is cmgr's own build path, run somewhere else: the same scan, the same converge, the same registry. What it does not do is run anything. Every schema is converged here with its builds on demand, which launches no instance, and the count the schema really asks for travels in the hand-over, for the orchestrator to converge to.
Its database is bookkeeping, not a source of truth: the orchestrator's is the one that matters, and the registry is where the images this made are found. Keeping it between runs makes them faster (a challenge whose source has not moved is not rebuilt), and losing it costs a re-derivation, in which every image already in the registry is adopted rather than built.
It is not disposable, though, while anything it built is being served. An orchestrator records each build under the id this plane gave it, because that is the id the artifact bundle is named by, and a re-derived plane draws new ones -- so its hand-over is refused. See BUILDER.md for what recovering from the loss of this database actually takes.