build-image
build-image copied to clipboard
Submodules do not get copied on cloning to container
When building a site, git submodules never get cloned with the repo to container.
You can work around this, though it is not very elegant, it should unblock you:
You can manually copy it over. While it isn't cloned into the container automagically, you can manually access the /opt/repo directory from the build image, to see the "local" filesystem and copy things off of it - for instance the submodule.
To get things started, in the build image, you'll have to run a "dummy" build command:
build ls
You should see some output like this:
$ build ls
Cloning into '/opt/buildhome/repo'...
done.
Installing dependencies
[...]
...which will be the docker image cloning the repo and installing dependencies, and "building" your site (in this case "run ls"). Then, you'll copy your submodule into the appropriate location inside of /opt/buildhome/repo - which is the copy we "work from" and have just created when you ran build ls) - before you run build your-real-build-command to actually use the newly imported submodule.
customers in the helpdesk/community to notify of a fix:
- Enterprise customer: https://netlify.zendesk.com/agent/tickets/33962