CircleCI Config Merge is a command-line tool designed to generate a unified .circleci/config.yml file by merging multiple YAML configuration files. This utility simplifies the management of complex CircleCI configurations, especially in monorepos or projects with numerous services.
Key Features:
Multi-file Merging: Combines multiple YAML files into a single .circleci/config.yml, streamlining the configuration process.
Customizable Structure: Supports flexible directory structures and naming conventions to suit diverse project needs.
Job List Aggregation: Enables merging lists of workflow jobs from different sources, enhancing scalability.
Integration with CI/CD Pipelines: Facilitates seamless integration into existing CI/CD workflows for consistent configuration validation.
Audience & Benefit:
Ideal for developers and DevOps teams managing large-scale projects or monorepos. By splitting configurations into smaller files, users can improve maintainability and reduce merge conflicts. The tool’s flexibility allows teams to adopt custom structures without adhering to predefined conventions, fostering efficiency and adaptability.
Install via winget for straightforward setup.
README
circleci-config-merge
Generate .circleci/config.yml by merging multiple files
Our motivation is to split a huge .circleci/config.yml per service.
We have a monorepo where many services are managed.
.circleci/config.yml of this repository has over 6000 lines, and it's hard to maintain the file.
Why don't we use circleci config pack?
The directory structure and naming rule don't match our needs.
And we want to merge the list of workflow's jobs.
In CI, we should test whether .circleci/config.yml and the result of circleci-config-merge merge is equal as YAML.
circleci-config-merge doesn't provide the feature to compare YAML, so please use the other tool like dyff.
Please see the example suzuki-shunsuke/example-circleci-config-merge as a reference to split .circleci/config.yml and setup CI.