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

  • Aaron Taylor
  • Feb 23 2018
  • Taking votes
  • Attach files
  • Guest commented
    August 23, 2018 15:33

    yeah I would love to see that feature too

  • Thomas Edwards 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.

  • John B 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.

  • Sergio Moya 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.

  • Sam S 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 

  • Owein Reese 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?

  • Jeff Hudson 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.

  • Timothy c commented
    December 03, 2019 16:26

    How about orbs instead?

  • Ian Rose 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.

  • Amram Ben David commented
    10 Feb 16:59

     I would like this feature as well