Monorepos allow for hosting multiple applications' code in one GitLab repository.
To leverage GitLab's CI/CD capabilities in a monorepo, distinct pipeline configurations are required for each application.
Previously, a workaround was necessary to include YAML files based on directory changes, involving hidden jobs and extended jobs.
GitLab 16.4 introduces "include with rules:changes" for pipelines, enabling conditional inclusion of pipeline files based on directory changes.
This allows for decoupling pipelines and running them only when specific application source code changes.
The project-level pipeline configuration triggers the appropriate pipeline based on changes detected.
Each application's pipeline file focuses on building and testing its code, without the need for job extensions.
The "changes" rule evaluates to true when pushing new branches or tags, potentially triggering all included jobs.
To mitigate this, feature branches should be created first and merge requests used for development.
Monorepos combined with GitLab's CI/CD offer an efficient approach for managing multiple applications.
To explore monorepos, a free GitLab Ultimate trial is available.
about.gitlab.com
about.gitlab.com
Create attached notes ...
