Content
YAML is a data serialization language that is often used in the design of configuration files. This language is based on JSON, where identation plays a very important role, tab characters are not supported, so whitespace is used, nor are there common formatting symbols, such as braces, square brackets, closing tags or quotation marks. YAML files use the .yml or .yaml extensions.
YAML can contain different kinds of data blocks:
Sequence: values listed in a specific order. A sequence starts with a dash and a space (-). You can think of a sequence as a Python list or an array in Bash or Perl.
For example:
- Flour
- Water
- Salt
Mapping: key and value pairs. Each key must be unique, and the order doesn't matter. Think of a Python dictionary or a variable assignment in a Bash script.
For example:
Store:
Bakery:
- ‘Sourdough loaf’
- ‘Bagels’
Cheesemonger:
- ‘Blue cheese’
- ‘Feta’
In this case we are going to use YAML for the implementation of pipelines, used for the CI/CD practice.
To build pipelines we need to define certain resources, these resources will be used to define what we want to build or verify with our pipeline which will be composed of the following: