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
    January 30, 2019 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
    May 01, 2019 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
    June 17, 2019 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
    June 26, 2019 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
    September 04, 2019 01:30

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

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    December 03, 2019 16:26

    How about orbs instead?

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    December 12, 2019 13:17

    > How about orbs instead?

     

    Being able to simply #include another file (or similar) is miles simpler than using Orbs.  I want to empower everyone on our engineering team to make changes to the build as necessary, but I definitely don't want everyone to have to learn how to interact with Orbs.  Most people just need to make a relatively small change to a shell command in our config.

  • Avatar40.8f183f721a2c86cd98fddbbe6dc46ec9
    Guest commented
    10 Feb 16:59

     I would like this feature as well