Implement a way to disable git submodule support completely #48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This option is very useful when you want to do very advanced or plain weird stuff with your submodules from the build scripts and Jenkins keep getting into your way. By disabling support for submodules you can still keep using basic git polling functionality and just have Jenkins to ignore submodules completely as if they didn't exist.
The motivation for this is a follows:
By default, whenever Jenkins detects that the repository uses submodules it will go ahead and check them all out whether you want it or not. In many cases this is totally appropriate, however, unfortunately some projects use submodules for things like different versions of JDKs and precompiled libraries and you really don't want to pull 4 Gigs worth of this stuff in.
However, if one gives up on git plugin completely, one loses the possibility of using SCM polling and all the fancy SCM-related goodies etc., which is annoying. So I decided to add an option to disable the support for submodules (false by default), which would take care of all these corner cases...
Signed-off-by: Yury V. Zaytsev yury@shurup.com