CircleCI Ideas

Support multiple files in .circleci folder

We are migrating to a mono-repo setup for a number of previously separate codebases, and our CircleCI config file has grown to many hundreds of lines. Now that config is within a `.circleci/` directory, is there an opportunity to split up the config file into multiple pieces to make it more comprehensible?

 

There was a similar feature request files here previously: https://discuss.circleci.com/t/support-multiple-files-in-circleci-folder/18705

  • Avatar32.5fb70cce7410889e661286fd7f1897de Guest
  • Feb 23 2018
  • Taking votes
  • Attach files
  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    August 23, 2018 15:33

    yeah I would love to see that feature too

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    October 22, 2018 15:44

    Same thing happened to us. We’re moving to one repo, but we have five projects running in it. A config file per project would be great, plus a master one. Maybe a file for each job in a `jobs` folder, and then a `workflows.yml` to tie them together.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    30 Jan 09:11

    Just the ability to include other files would be nice. But something like Orbs but just with local & private files would be great. We need to be able to treat pipeline config as proper code.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    01 May 21:52

    It should be a great enhancement because you may have many complex process happening on ci, so is important to keep those process in order.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    17 Jun 23:27

    If anyone wants to do this right now, this repo I just published makes it easy to generate a single config.yml from many, and just uses the circleci-cli tool under the hood to pack and process files. It even lets you use circleci 2.1 syntax, including orbs, on CircleCI Enterprise, by compiling them at dev time down to fully expanded 2.0 syntax: https://github.com/samsalisbury/circleci-multi-file-config 

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    26 Jun 13:27

    Yeah, much like Ansible or other "programming  languages" (ugh, hate describing it like this,) could you add in `import` support?

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    04 Sep 01:30

    We recently hit 1000 line config and there is little to no duplication. I would love to see this too.