GitLab

How to include file references in your CI/CD components

CI/CD components can be used to reuse pipeline configurations, but they cannot access additional files stored outside of the pipeline repository. However, with the new CI/CD Steps programming language, users can reuse centralized automation scripts and dependencies in their pipelines. CI/CD Steps are reusable units of a job that define structured inputs and outputs and can be consumed by other steps. Steps can come from local files, GitLab.com repositories, or any other Git source. CI/CD components are reusable units of pipeline configurations that bring additional jobs into the pipeline, but they cannot bring additional files. To access additional files, users can store scripts in a central location and wrap them in CI/CD Steps, which can be called from CI/CD components. This eliminates the need to duplicate scripts across multiple repositories and CI/CD configurations. To use CI/CD Steps, users need to define a component with the run keyword, create a step.yml file in the project where the scripts and dependencies are located, and include the component in their CI/CD configuration. The CI/CD Steps feature is currently experimental and the syntax may change based on user feedback. By using CI/CD Steps, users can gain greater flexibility and make their pipelines more powerful and adaptable.
favicon
about.gitlab.com
about.gitlab.com