Module Gitlab_ci.Util

Smart constructors for values of Types

val default : ?image:Types.image -> ?interruptible:bool -> unit -> Types.default

Constructs a default: configuration element.

val job_rule : ?changes:string list -> ?if_:If.t -> ?variables:Types.variables -> ?when_:Types.when_ -> ?allow_failure:Types.allow_failure_rule -> unit -> Types.job_rule

Constructs a job rule.

when_ defaults to On_success.

If when_ is set to Manual then the default allow_failure will be overwritten to allow failure, to avoid blocking jobs. This typically makes sense unless you truly want a job to block the execution of all later jobs (i.e. for a trigger-type job). If you want to make such a job, set ~allow_failure explicitly: job_rule ~when_:Manual ~allow_failure:false ().

val workflow_rule : ?changes:string list -> ?if_:If.t -> ?variables:Types.variables -> ?when_:Types.when_workflow -> unit -> Types.workflow_rule

Constructs a workflow rule.

when_ defaults to Always.

val include_rule : ?changes:string list -> ?if_:If.t -> ?when_:Types.when_workflow -> unit -> Types.include_rule

Constructs an include rule.

Include rules do not permit variables and there is consequently no such parameter.

when_ defaults to Always.

val job : ?after_script:string list -> ?allow_failure:Types.allow_failure_job -> ?artifacts:Types.artifacts -> ?before_script:string list -> ?cache:Types.cache list -> ?image:Types.image -> ?interruptible:bool -> ?needs:Types.need list -> ?dependencies:string list -> ?rules:Types.job_rule list -> ?services:Types.service list -> ?stage:string -> ?variables:Types.variables -> ?timeout:Types.time_interval -> ?tags:string list -> ?when_:Types.when_job -> ?coverage:string -> ?retry:int -> ?parallel:Types.parallel -> name:string -> script:string list -> unit -> Types.job

Constructs a job.

val artifacts : ?expire_in:Types.expiration -> ?reports:Types.reports -> ?when_:Types.when_artifact -> ?expose_as:string -> ?name:string -> string list -> Types.artifacts

artifacts paths Construct an artifacts: clause storing paths.

  • expire_in: is omitted if expire_in is None.
  • reports: is omitted if reports is None.
  • when: is omitted if when_ is None.
  • expose_as: is omitted if expose_as is None.

At least one of paths or reports must be non-empty.

val reports : ?dotenv:string -> ?junit:string -> ?coverage_report:Types.coverage_report -> unit -> Types.reports

Construct an reports: clause for artifacts:.

  • dotenv: is omitted if dotenv is None.
  • junit: is omitted if junit is None.
  • coverage_report: is omitted if coverage_report is None.