package datakit-ci

  1. Overview
  2. Docs
type t

A cache of states.

type target

A mutable holder for the current state of a target.

module State : sig ... end
val create : unit -> t
val lookup : t -> CI_utils.DK.t -> CI_target.t -> target Lwt.t
val record : target -> CI_utils.DK.t -> source_commit:string -> CI_utils.DK.Commit.t -> string CI_output.t Astring.String.Map.t -> unit Lwt.t

record target dk ~source_commit input jobs records the new output of each job in jobs as a new commit of target, and records that it was calculated using metadata snapshot input. The commit index of source_commit is updated to include the new result (for builds_of_commit).

load commit loads a saved state from the database.

val head : target -> State.t option

head t is the current state of t.

builds_of_commit dk c finds the latest build results for source commit c.