package current_ocluster

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

This module provides an OCurrent plugin for building with OCluster.

module Connection : sig ... end

A connection to the OCluster scheduler. Provides automatic reconnection on failure, queuing with rate limiting, metrics reporting, etc. This can be passed to Current_ocluster.v for simple cases, or it can used directly to implement custom pipeline steps if that isn't flexible enough.

type t

The configuration for accessing the build cluster.

type urgency = [
  1. | `Auto
    (*

    Builds will be marked as urgent whenever there isn't some existing latched output that can be used while waiting.

    *)
  2. | `Always
    (*

    All builds will be marked as urgent.

    *)
  3. | `Never
    (*

    No builds will be urgent.

    *)
]
val v : ?timeout:Duration.t -> ?push_auth:(string * string) -> ?urgent:urgency -> Connection.t -> t

v conn is a builder that submits jobs using conn.

  • parameter push_auth

    : the username and password to use when pushing to the Docker Hub staging area.

  • parameter timeout

    : default timeout

  • parameter urgent

    : when to mark builds as urgent (default `Auto).

val with_timeout : Duration.t option -> t -> t

with_timeout x t is a copy of t with the specified timeout, but still sharing the same connection.

val with_push_auth : (string * string) option -> t -> t

with_push_auth x t is a copy of t with the specified push settings, but still sharing the same connection.

val with_urgent : urgency -> t -> t

with_urgent x t is a copy of t with urgency policy x.

val build : ?cache_hint:string -> t -> pool:string -> src:Current_git.Commit_id.t list Current.t -> options:Cluster_api.Docker.Spec.options -> [ `Contents of string Current.t | `Path of string ] -> unit Current.t

build t ~pool ~src ~options dockerfile builds dockerfile in context src using pool pool within build cluster t. Note: all commits in src must be in the same repository.

val build_and_push : ?cache_hint:string -> t -> push_target:Cluster_api.Docker.Image_id.t -> pool:string -> src:Current_git.Commit_id.t list Current.t -> options:Cluster_api.Docker.Spec.options -> [ `Contents of string Current.t | `Path of string ] -> string Current.t

build_and_push is like build but also uploads the resulting image to push_target on success. Returns the RepoId of the pushed image. If t doesn't have push_auth configured, this still tests the build, but returns an error at the end.

val build_obuilder : ?cache_hint:string -> t -> pool:string -> src:Current_git.Commit_id.t list Current.t -> Cluster_api.Obuilder_job.Spec.t Current.t -> unit Current.t

build_obuilder t ~pool ~src spec builds spec in context src using pool pool within build cluster t. Note: all commits in src must be in the same repository.

module Raw : sig ... end
OCaml

Innovation. Community. Security.