Symlink circle.yml

circle.yml

#1

Is it possible to symlink the circle.yml file from root to a different location of preference?

All of my experiments have led to an ambiguous “Circle Bug”, which does not imply that this functionality is impossible, so I resort to asking a question here.

The general use case, that led to this problem:
Given multiple microservice repositories, that all share the same configuration (including circle.yml), it would be convenient to store that configuration in a separate git repository to be embedded (using subtree, because its content is populated upon a regular git clone) and, if necessary, symlinked to the root of the repos.
However, circle.yml seems to be needing special treatment, or does it?


#2

I ran a test build to try this out: https://circleci.com/gh/levlaz/circleci-testing/132

As you can see (by the output of the test) We totally support reading circle.yml as a symlink.

ls -al
total 12
drwxrwxr-x 1 ubuntu ubuntu   64 Jun 22 20:10 .
drwxr-xr-x 1 ubuntu ubuntu  430 Jun 22 20:10 ..
lrwxrwxrwx 1 ubuntu ubuntu   13 Jun 22 20:10 circle.yml -> ln/circle.yml
drwxrwxr-x 1 ubuntu ubuntu  180 Jun 22 20:10 .git
-rw-rw-r-- 1 ubuntu ubuntu 1080 Jun 22 20:10 LICENSE
drwxrwxr-x 1 ubuntu ubuntu   20 Jun 22 20:10 ln
-rw-rw-r-- 1 ubuntu ubuntu   60 Jun 22 20:10 README.md

I think the key issue is that if you wish to use a circle.yml in a build it must exist at the start of the build. We do not support being able to link to a circle.yml as a part of the build. The build configuration happens before the build starts.

I think workflows might address your use case. We are also working on making it possible to “share” configurations across multiple projects.


#3