Hi wonderful people,
I am using it, but there is a big gap between it and my ideas. I don’t know if I used it incorrectly. I want to be able to call the files in the CI/CD catalog in other repositories. What should I do?
I found that I can only run template.yml like a script, which seems meaningless. Include-remoe has already implemented it. any ideas?
I have carefully read it CI/CD components | GitLab
Thanks for your feedback, I have shared it with our team working on CI/CD components.
With the CI/CD Catalog Beta coming up in 16.7, we have refactored and restructured the documentation into one documentation page. CI/CD components | GitLab provides the latest documentation.
Use a component describes how to include a component.
Example:
include:
- component: URL-path/component-template@version
inputs:
custom_version: 1.72.0
One of the advantages over raw CI/CD template paths is that you can include a tagged release, and ensure nothing breaks when the CI/CD component gets updated again – and test changes in your consumer projects beforehand.
Component description and README
A component’s README.md will be rendered in the CI/CD catalog index view. You can follow the structure of
- Introduction and what the component is for
- Usage guide, including inputs
- Tests
- Resources
An example is in Developer Evangelism and Technical Marketing at GitLab / use-cases / CICD Components Catalog / Components (Templates) / Component - Rust Basic · GitLab with more GitLab-maintained CI/CD components migrated at the moment in Migrate GitLab-Maintained Template to Components (#432540) · Issues · GitLab.org / GitLab · GitLab
We are working on improving the best practices for the README.md documentation in Docs: best practices for components project README (#430816) · Issues · GitLab.org / GitLab · GitLab
Component Types and Inputs
I found that I can only run template.yml like a script, which seems meaningless. Include-remoe has already implemented it. any ideas?
Components support inputs, which allow more dynamic and reusable CI/CD workflows. For example, you can create a Rust compile job, and depending on the inputs, you can specify a different stage, image version, and even job name. Inputs allow to generate dynamic job names.
templates
are a component type, and are the first iteration. There will be more types in the future, you can follow the main epic CI/CD Components & Catalog (&7462) · Epics · GitLab.org · GitLab and related sub epics.
Talk
I gave a lightning talk at the GitLab booth at KubeCon NA 2023. The most recent slide deck iteration is in Efficient DevSecOps workflows with reusable CI/CD components - DevRel maintained FY25 - Google Slides Hope it helps with more story telling.
More Resources
- CI/CD components and catalog
- Direction: Category Direction - Component Catalog | GitLab
- Architecture blueprint: CI/CD Catalog | GitLab
- CI Steps: Step Runner for executing GitLab Steps | GitLab