Concatenating scripts with `*script` is not possible when using multiple files via include?
When including multiple files with reusable scripts it fails saying yaml syntax is incorrect, example:
# _common.gitlab-ci.yml
.my_script: &scripting
- echo "Here I am"
# otherfile.gitlab-ci.yml
job:
script:
- *scripting
- echo "There you are"
# .gitlab-ci.yml
include:
- local: _common.gitlab-ci.yml
- local: otherfile.gitlab-ci.yml
Pipeline fails with the following message: Included file otherfile.gitlab-ci.yml
does not have valid YAML syntax!
Searched all over the internet, gitlab docs and issues, but got no clue. In addiction, I've tested with CI Lint and it validates correctly when putting them all together, but when in separated files they just don't work while running pipeline.
Is there something wrong with the yaml or is there any other problem within?