Documentation bug in job template section
the example listed in the yaml special features section,
.job_template: &job_definition
script:
- test project
.postgres_services:
services: &postgres_definition
- postgres
- ruby
.mysql_services:
services: &mysql_definition
- mysql
- ruby
test:postgres:
<< *job_definition
services: *postgres_definition
test:mysql:
<< *job_definition
services: *mysql_definition
seems to be wrong.
I tried to validate it in the CI Linter in my gitlab instance (version 8.9.6), and it fails validation:
Error: (<unknown>): mapping values are not allowed in this context at line 21 column 11
.
I noticed that there might have been :
's missing from after the <<
's, so i added those and it seemed to pass.
working example:
.job_template: &job_definition
script:
- test project
.postgres_services:
services: &postgres_definition
- postgres
- ruby
.mysql_services:
services: &mysql_definition
- mysql
- ruby
test:postgres:
<<: *job_definition
services: *postgres_definition
test:mysql:
<<: *job_definition
services: *mysql_definition