Automatically load git submodules


If a repo has submodules in it, it would rock for CircleCI’s infered dep handling to automatically git submodule update --init on it. For context, I use this for lots of Docker repos, where the repo is the docker metadata, and it submodules in the source for my app or whatnot. Leads to a bit of confusion when CircleCI tries to build and the app code is missing :smile:


Same here, would love to see this type of integration. I’m working with a shared submodule that is updated often and would hate for things to break when pushing code while not fetching the latest submodule version.


Thanks for the feedback @LarrrrryT! Can you make sure to “like” this issue by clicking the little heart, this is how we gauge demand from users for a particular issue :slight_smile:


pd-for-android needs --recursive update. Any reason not to make this the default?

git submodule update --init --recursive

Please define ANDROID_NDK_HOME

How does one workaround this currently? (I’m a noobie stuck on this step at the moment.)

Given the interest, this would be a good candidate for the FAQ.


I too would like this, but as mentioned @joebowbeer I actually have recursive submodules so the command needs to be git submodule update --init --recursive. In fact, its even easier if the initial checkout had a recursive modifier and then circleci would do git clone --recursive instead of the normal git clone.

Note git clone --recursive works for repos without submodules so it could be the default.


My work-around is:

- git submodule sync --recursive
- git submodule update --recursive --init


In my opinion, it mustn’t be the new default, but a switchable option in the Dashboard.

For my case in particular, the workaround mentioned above would not work, because I attempt to store the circle.yml in the submodule and symlink it to the root of the directory.
Generally speaking, is there no way for my idea to work, with the way CircleCI operates?