Feature request: share config.yml between projects

config

#1

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.

Requirements

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:

---
inherit_gem:
  my_team_rubocop: .rubocop.yml

# local config goes below here

#2

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


#3

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.


#4

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.


#5

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.


#6

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