DotCi
DotCi copied to clipboard
Add support for git submodules, including private ones
Currently if you have a project with submodules the DotCi git steps don't do git submodule update --init
at all. At a minimum that should be added into all of the various locations git scm commands are (which might be a good time to centralize those into a single helper location, or even see if the git plugin has classes that could be used to do the clone work). With that in place DotCi would handle public submodules, but because of how it uses a deploy key per repo that it adds when the repo is added private submodules will still fail. I'm not 100% sure the best solution, but there are a couple I can suggest for discussion:
- Detect submodules on each run and rectify against a list stored in the DB; add the projects deploy key (or a new key) to any added, remove from any removed.
- Support a global deploy key for a CI user on github (a pretty common pattern); setting this global deploy key option (probably through Jenkins credentials) would then cause jobs to use it and not create, add, nor use a per project key. Probably best in this world to allow overriding on a per job level to make some use a per-project deploy key and others not.
+1 to support git submodules
but still desire a build before section to then define steps on thos git submodules e.g. https://github.com/DotCi/jenkinsci-dotci-example/blob/master/.ci.yml#L17
I need this to be able to use DotCI as well