Can I split a config into multiple files?

It is not possible to have a config split across multiple files as CircleCI requires a single config file in .circleci/config.yml to start running.

While there are examples of split configs in some open source project, such as our Orbs, this is generally just to make them more human-readable. Before these can be used the config must be packed with the CLI - this creates a single config.yml file which can be used with CircleCI.

This packing procedure cannot be run as a "pre" step on CircleCI itself as it is not possible to run arbitrary commands before a workflow. Additionally, the workflow itself will not be generated if a valid "whole" config is not found. Config packing must be run locally, with the resulting file checked in to your repo.

Was this article helpful?
6 out of 11 found this helpful



Article is closed for comments.