Commit c55da6d5 authored by Marcel Amirault's avatar Marcel Amirault Committed by Diana Logan

Add note explaining that nested arrays are OK

parent dbac37d4
...@@ -83,7 +83,41 @@ where: ...@@ -83,7 +83,41 @@ where:
- Configuration imported with [`include`](../yaml/index.md#include) is copied into the view. - Configuration imported with [`include`](../yaml/index.md#include) is copied into the view.
- Jobs that use [`extends`](../yaml/index.md#extends) display with the - Jobs that use [`extends`](../yaml/index.md#extends) display with the
[extended configuration merged into the job](../yaml/yaml_optimization.md#merge-details). [extended configuration merged into the job](../yaml/yaml_optimization.md#merge-details).
- YAML anchors are [replaced with the linked configuration](../yaml/yaml_optimization.md#anchors). - [YAML anchors](../yaml/yaml_optimization.md#anchors) are replaced with the linked configuration.
- [YAML `!reference` tags](../yaml/yaml_optimization.md#reference-tags) are also replaced
with the linked configuration.
Using `!refence` tags can cause nested configuration that display with
multiple hyphens (`-`) in the expanded view. This behavior is expected, and the extra
hyphens do not affect the job's execution. For example, this configuration and
fully expanded version are both valid:
- `.gitlab-ci.yml` file:
```yaml
.python-req:
script:
- pip install pyflakes
lint-python:
image: python:latest
script:
- !reference [.python-req, script]
- pyflakes python/
```
- Expanded configuration in **View merged YAML** tab:
```yaml
".python-req":
script:
- pip install pyflakes
lint-python:
script:
- - pip install pyflakes # <- The extra hyphens do not affect the job's execution.
- pyflakes python/
image: python:latest
```
## Commit changes to CI configuration ## Commit changes to CI configuration
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment