Data models

Macros

Macros can be used to model reusable workflow parts. A macro consists of a list of actions and has input and output parameters. It can be included in a workflow (or indeed another macro) through an include action.

Macros are specified in the configuration file macros/macros.yaml.

PropertyTypeDescription
id
(required)
stringA unique macro identifier
name
(required)
stringA human-readable name
description
(required)
stringA human-readable description
parameters
(optional)
arrayAn optional list of input and output parameters that can be accessed from outside the macro to provide arguments or to access return values, respectively.
vars
(optional)
arrayAn optional list of private variables that can be used inside the macro. These variables are not accessible from the outside.
actions
(required)
arrayThe actions to execute
Example
yaml
id: delayed_docker_hello_world
name: Delayed Docker hello world
description: >-
  Wait for the given number of seconds and then run the
  hello-world Docker image
 
parameters:
  - id: seconds
    name: seconds to wait
    description: The number of seconds to wait
    type: input
 
actions:
  - id: sleep
    type: execute
    service: sleep
    inputs:
      - id: seconds
        var: seconds
  - type: execute
    dependsOn: sleep
    service: docker_hello_world

Macro parameters

Macro parameters describe inputs and outputs of macros.

PropertyTypeDescription
id
(required)
stringA unique parameter identifier
name
(required)
stringA human-readable name
description
(required)
stringA human-readable description
type
(required)
stringThe type of this parameter. Valid values: input, output
default
(optional)
stringAn optional default value for this parameter that will be used if a parameter value is not explicitly provided when the macro is included.
Example
yaml
id: seconds
name: seconds to wait
description: The number of seconds to wait
type: input