package current-web-pipelines

  1. Overview
  2. Docs
Simplify the creation of pipeline websites

Install

Dune Dependency

Authors

Maintainers

Sources

current-web-pipelines-0.1.tbz
sha256=efc3e28a9748f75ef1abf5bf2e559e96d1d233982970ef4b789a8cec3bf0d133
sha512=5c40d56a33b170d00a2d7dc03e3e6cba1041f8fd34bb645c812312cb1f96ab7279c9772704e0519eb1ed33b6275d51a027653833fcb2420eee7f990150a167fe

Description

Extends current_web with additional routes providing a pipeline-oriented view of ocurrent's state

Published: 06 Jul 2023

README

current-web-pipelines

current-web-pipelines is a wrapper on top of ocurrent pipelines that provide tools to build complex interfaces, for example representing multi-stage pipelines.

Usage

There are three modules:

Task

('value, 'state) Task.t is the equivalent of 'value Current.t with extra metadata of type 'state. While the value might not be available (for example because it is not computed yet), the state can be obtained at all time. Task provides combinators and specialized constructors to construct a reactive state structure that can be extracted and displayed in various ways.

State

('output, 'node_metadata, 'stage_metadata, 'pipeline_metadata) State.pipeline is one example of state that can be bound to a task. This type represents the state of a pipeline run, using the following structure:

  • pipeline metadata

  • stage list:

    • stage metadata

    • node tree list:

      • node metadata

      • output or status

This tree structure is displayed using the Web module.

Web

Use Web.Make to create an instance of the website. The API requires to use:

  • make to initialize

  • update_state to track the state of a pipeline run. In particular each pipeline run is bound to a source (the reason why it runs) and is part of a group.

  • set_active_sources to track which sources are still active

  • routes to provide current_web with additional routes for the generated website

Examples

See the example/ folder for an end-to-end usage of current-web-pipelines. It's also deployed in mirage-ci (https://github.com/ocurrent/mirage-ci) and was used in tezos-ci (https://github.com/tarides/tezos-ci).

Dependencies (8)

  1. routes >= "2.0.0"
  2. duration >= "0.2.0"
  3. fmt >= "0.8.9"
  4. current_git >= "0.6.4"
  5. current_web >= "0.6.4"
  6. current >= "0.6.4"
  7. ocaml >= "4.10"
  8. dune >= "2.8"

Dev Dependencies (1)

  1. odoc with-doc

Used by

None

Conflicts

None

OCaml

Innovation. Community. Security.