Feature request: share config.yml between projects

My team wants to be consistent about how we use CircleCI across all our projects. We’d like to use a standard .circleci/config.yml file and include it in each project.


The requirements would be:

  1. We are able to maintain the .circleci/config.yml centrally and do appropriate change management.
  2. We can make variations to the configuration for individual projects.

Possible approach

For our code quality tool, Rubocop, we can already do this. We have a centrally-maintained .rubocop.yml file that is included in each project using a private gem. Then the local .rubocop.yml file in each project includes it like this:

  my_team_rubocop: .rubocop.yml

# local config goes below here
1 Like

Here’s the documentation on how inherit_gem works in Rubocop.

Nice idea, make sure you add it to the Ideas list on the main site.

We recently discussed here a manual workaround, with a scripted failsafe in case a copy gets out of date.

1 Like

Not 100% as I haven’t played with it yet, but I think the ORBs that are part of 2.1 will perform what you need.

I’m not sure what the support status is of these new features, though I have asked in the thread.

Yes, orbs are definitely designed to let you share config across projects. As of today you can write inline orbs, but we will soon allow you to add orbs to the orb registry and reference them in all your projects. See the linked thread above for details.

1 Like

FYI, Orbs are now officially launched and should help with sharing config. https://circleci.com/docs/2.0/orb-intro/

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.