Our circle ci configuration is getting rather large (450+ lines), and I was wondering if there’s any support for splitting the config file into multiple files yet?
Is there any duplication in this file? You can use predefined YAML references to replace duplicate sections with a reference symbol to a single copy. If this might help, check Wikipedia - it is surprisingly detailed.
Yeah, I know about references, but really it’s not that much help and also adds mental overhead.
OK, the simple solution I’d do is:
- Split the file into pieces and store in whatever format you like
- Write a script to merge and convert the pieces as appropriate into the YAML output
- Commit the script, the individual pieces, and the script output
- Whenever you make a change to a piece, run the script again and commit the changed piece(s) and the full version
- Create a new CI step to ensure the full version is up-to-date with the pieces (you want your CI to fail if they come out of sync)
This post was flagged by the community and is temporarily hidden.
There isn’t currently support for splitting config files. We see some that are very large (multiple thousands of lines). Please feel free to submit a feature request: https://circleci.com/ideas/