EasyEnv
Engineering/Courses/Catalog/GitLab CI/Includes and Templates
GitLab CI
IntermediateLesson 9 of 1130 min · hands-on

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 Templates

What 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
  1. 1What Is CI/CD20 min
  2. 2Your First Pipeline25 min
  3. 3Jobs and Stages30 min
  4. 4Variables and Secrets30 min
  5. 5Artifacts and Caches30 min
  6. 6Rules and Conditional Jobs30 min
  7. 7Docker Jobs and Services35 min
  8. 8Environments and Deployments30 min
  9. 9Includes and Templates30 min
  10. 10Runners30 min
  11. 11Capstone: Build, Test, Deploy60 min

Explore other courses

Includes and Templates - GitLab CI (English) | Engineering Courses