yaml-parse
yaml-parse is a utility step that parses a YAML file and extracts values
using expr-lang expressions.
Configuration
| Name | Type | Required | Description |
|---|---|---|---|
path | string | Y | Path to a YAML file. This path is relative to the temporary workspace that Kargo provisions for use by the promotion process. |
outputs | []object | Y | A list of rules for extracting values from the parsed YAML. |
outputs[].name | string | Y | The name of the output variable. |
outputs[].fromExpression | string | Y | An expr-lang expression that can extract the value from the YAML file. Note that this expression should not be offset by ${{ and }}. See examples for more details. |
Expressions
The fromExpression field supports expr-lang expressions.
note
Expressions should not be offset by ${{ and }} to prevent pre-processing
evaluation by Kargo. The yaml-parse step itself will evaluate these
expressions.
An outputs object (a map[string]any) is available to these expressions. It
is structured as follows:
| Field | Type | Description |
|---|---|---|
outputs | map[string]any | The parsed YAML object. |