Reynir Björnsson
56737ec71b
Sqlite3 application_id and user_version are now set to identify the database is a builder-web database, and the user_version represents the schema version. The 'build' table is extended with a 'main_binary' column. This represents the main binary artifact from the build. This is decided by there being exactly one file in bin/. A migration tool is written that does both migrations and rollbacks, and migration and rollback is implemented for the above mentioned change.
35 lines
1.2 KiB
OCaml
35 lines
1.2 KiB
OCaml
type error = [ Caqti_error.call_or_retrieve | `Not_found | `File_error of Fpath.t | `Msg of string ]
|
|
|
|
val pp_error : Format.formatter -> error -> unit
|
|
|
|
val build_artifact : Uuidm.t -> Fpath.t -> Caqti_lwt.connection ->
|
|
(string * Cstruct.t, [> error ]) result Lwt.t
|
|
|
|
val build_artifacts : Builder_db.id -> Caqti_lwt.connection ->
|
|
(Builder_db.file list, [> error ]) result Lwt.t
|
|
|
|
val build : Uuidm.t -> Caqti_lwt.connection ->
|
|
(Builder_db.id * Builder_db.Build.t, [> error ]) result Lwt.t
|
|
|
|
val build_exists : Uuidm.t -> Caqti_lwt.connection ->
|
|
(bool, [> error ]) result Lwt.t
|
|
|
|
val main_binary : Builder_db.id -> Builder_db.Build.t -> Caqti_lwt.connection ->
|
|
(Builder_db.file option, [> error ]) result Lwt.t
|
|
|
|
val job : string -> Caqti_lwt.connection ->
|
|
((Builder_db.id * Builder_db.Build.Meta.t) list, [> error ]) result Lwt.t
|
|
|
|
val jobs : Caqti_lwt.connection ->
|
|
(string list, [> error ]) result Lwt.t
|
|
|
|
val user : string -> Caqti_lwt.connection ->
|
|
(Builder_web_auth.user_info option, [> error ]) result Lwt.t
|
|
|
|
|
|
val add_build :
|
|
Fpath.t ->
|
|
(Builder.job * Uuidm.t * (int * string) list * Ptime.t * Ptime.t *
|
|
Builder.execution_result * (Fpath.t * string) list) ->
|
|
Caqti_lwt.connection ->
|
|
(unit, [> error ]) result Lwt.t
|