FsMake


Step Module

Module for creating and working with steps.

Types

Type Description

Builder

A Step computation expression builder.

Functions and values

Function or value Description

context

Full Usage: context

Returns: Make<MakeContext> The MakeContext.

Gets the current MakeContext.

Returns: Make<MakeContext>

The MakeContext.

Example

 let myStep =
     Step.create "myStep" {
         let! ctx = Step.context
         printfn "Current pipeline: %s" ctx.PipelineName
     }

create name

Full Usage: create name

Parameters:
    name : string - The name of the step.

Returns: Builder A Builder.

Creates a step using a Builder computation expression.

name : string

The name of the step.

Returns: Builder

A Builder.

Example

 let emptyStep =
     Step.create "emptyStep" {
         ()
     }

fail message

Full Usage: fail message

Parameters:
    message : string - The message to be printed as the failure reason.

Returns: Make<unit> An ErrorMake.

Fails the current step with a message.

message : string

The message to be printed as the failure reason.

Returns: Make<unit>

An ErrorMake.

Example

 let myStep =
     Step.create "myStep" {
         do! Step.fail "Oh no!"
     }

failMessages messages

Full Usage: failMessages messages

Parameters:
    messages : Message list - The messages to be printed.

Returns: Make<unit> An ErrorMake.

Fails the current step with a list of Message to be printed. This can be used to create detailed multi-line failures.

messages : Message list

The messages to be printed.

Returns: Make<unit>

An ErrorMake.

Example

 let myStep =
     Step.create "myStep" {
         do!
             [ Console.error "Oh " |> Console.appendToken "no!" ]
             |> Step.failMessages
     }