Generate .circleci/config.yml by merging multiple files
MIT License
Generate .circleci/config.yml by merging multiple files
https://dev.to/suzukishunsuke/splitting-circleci-config-yml-10gk
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.
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.
Download from GitHub Releases. You can install circleci-config-merge with Homebrew too.
$ brew install suzuki-shunsuke/circleci-config-merge/circleci-config-merge
You can install circleci-config-merge with aqua too.
After installing circleci-config-merge, please check if it is installed properly.
$ circleci-config-merge --version
circleci-config-merge version 0.1.0
Please see examples and example-cirleci-config-merge.
$ circleci-config-merge merge <file> [<file> ...] > .circleci/config.yml
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.
The split file format is same as .circleci/config.yml.
Coming soon.