Shared configuration across multiple projects

circle.yml

#1

Hi,

We are using CircleCI to build several (iOS) projects.
For all these projects, we have added the same circle.yml file to perform the same custom configuration steps before each build (select Xcode version, install specific version of Cocoapods, install custom tools…).

Our circle.yml file is currently duplicated across all our projects. When we want to change something in this file, we have to make the change in all our projects (as we want the same configuration for all our iOS builds).

Would it be possible to have a way to share configuration across multiple projects?


Notifications from the Project Configuration UI
#2

I agree this would be a great feature, thanks so much for proposing it.


#3

Hi Simon,
We have the same problem here. Did you find a solution ?
I tried to use git submodule to ckeckout a shared circle.yml file and override the current circle.yml but of course it doesn’t work because new YAML config is not parsed and used.
Does someone has an idea ?


#4

Hi gregumo,

Nope, I did not find any solution. Our circle.yml file is still duplicated across all our projects…


#5

Ok thx Simon, we decided to use a git submodule with shared shell files for now.


#6

I’ve gotten used to writing shared Groovy libraries for Jenkins and I’m looking to make the switch to Circle for some smaller projects and this feature will be sorely missed. Surely it can’t be too complicated? Consider this my upvote!


#7

Attempting to store the circle.yml in a submodule and symlinking it to the root leads to a “Circle Bug”, because there doesnt seem to be a way to make Circle populate the submodule without using the circle.yml itself.

Did anybody figure out a way to avoid changing the exact same circle.yml file in 20 repositories, just to use a newer node version? :smiley:

I’m thinking subtrees could possibly work…


#8

+1 same issue in my projects, all services need the same config…


#9

I’m trying to envision what a good solution to this would look like, and for the moment I have it in mind to put a common circle.yml file into a cloud storage bucket. But what I’m struggling with is a want to get it into the normal workflow. It’s as if it needs to live in the git repo but “invisible” to the developers.

I’m wondering if some sort of git-hook might be useful here. I’m no fan of submodules like I’ve heard some people mention. Perhaps Bitbucket has a feature that would come in hand for this (yes I’m on bitbucket not github).


#11

I would love this feature.

As a potential solution, I’d be happy to keep a circle.yml file in the root of my repository, but put a URL in it to point to another circle.yml file that I actually want it to use. Ideally, this would account for HTTP auth and/or proxy configurations that may be necessary.


#12