Includes and Templates
Part of the GitLab CI course
By your third project, the .gitlab-ci.yml files start to rhyme. The same lint job. The same test setup with the same cache key. The same docker-in-docker incantation, copied from the last repository because you knew it worked there. Copy and paste is genuinely the right call the first two times.
GitLab gives you two tools for this, doing two different jobs. include: pulls in whole files from somewhere else. extends: lets one job inherit from another. Most real pipelines use both. ...
Want to learn GitLab CI Includes and Templates in a real environment?
Click below, get a fresh Linux box with GitLab CI ready to go, and work through Includes and Templates hands-on with an AI tutor that knows your code.
Start this lessonIncludes and TemplatesWhat you'll learn
- Include local
- Include project
- Include remote
- Include template
- Extends keyword
- YAML anchors
- Built-in templates
Read this lesson in your language
All lessons in this course
11 lessons- 1What Is CI/CD20 min
- 2Your First Pipeline25 min
- 3Jobs and Stages30 min
- 4Variables and Secrets30 min
- 5Artifacts and Caches30 min
- 6Rules and Conditional Jobs30 min
- 7Docker Jobs and Services35 min
- 8Environments and Deployments30 min
- 9Includes and Templates30 min
- 10Runners30 min
- 11Capstone: Build, Test, Deploy60 min
