Improve documentation for how include works in context of extends
The documentation for extends
is missing an example of using it with include
, which was an important part of why it was built.
- Documentation: https://docs.gitlab.com/ee/ci/yaml/#extends
- Issue: https://gitlab.com/gitlab-org/gitlab-ee/issues/6136
The documentation should describe a use case something like the following as an example of how to include using extends:
included.yml
.template:
script:
- echo Hello!
.gitlab-ci.yml
include: included.yml
useTemplate:
image: alpine
extends: .template
This will run a job in the .gitlab-ci.yml
called useTemplate that runs echo Hello!
as defined in the template and uses the alpine
Docker image as defined in the local job.
Edited by Jason Yavorska