Shared CI logic for 40 projects needs central control.
IntermediateScenarioGitLab CI
Answer
Situation read → Template reuse.
What I'd do →
- Store templates in a central project and include them:
include: - project: platform/ci-templates ref: v3.2.0 file: /templates/build.yml. - Use
extends:and hidden.basejobs, andinputswithspec:inputsfor parameterisation. - Enforce mandatory jobs with compliance pipelines or pipeline execution policies.
Why → Pinning ref gives safe versioned rollout.
Interview tip → Know include:local|project|remote|template|component and CI/CD components.
More on GitLab CI
How does GitLab CI/CD work at a high level?BeginnerWhat is a GitLab Runner and what executors exist?IntermediateWhat are the types of runners (shared, group, project) and tags?IntermediateHow do `rules:` work and how do they replace `only/except`?IntermediateWhat are workflow rules and how do they prevent duplicate pipelines?AdvancedHow do artifacts and cache differ in GitLab CI?Intermediate