There is an "Advanced submodule behaviours" section under the "Additional
Behaviours" button in the git section of the job configuration page.  If
"Recursively update submodules" is checked, then it should update those
submodules.

If the additional behavior is added to clean before checkout, that may help
your case as well.

There are many, many ways that submodule configurations and parameters can
interact with the plugin, and there are very few automated tests of those
many different cases.  Automated test submissions to better test submodule
support in the git plugin and the git client plugin would certainly be
viewed positively.

There are some command line git versions (the 1.7.2.5 version included with
Debian 6, for instance), which aren't new enough to be as well behaved with
submodules as later versions of git.  Since that old version is not
officially supported with the git plugin (due to other gaps in
functionality), it is no surprise that it is not as well behaved as newer
versions of git.

There are two different pending pull requests which propose to always
include submodules in clean (git clean -xffd).  However, neither of the
pull requests have tests, and I'm not a user of submodules generally, so I
don't have enough interactive test experience to allow those changes into
the plugin without much more testing.

If you're interested in more reading about submodules, checkout, and clean,
consider:

https://issues.jenkins-ci.org/browse/JENKINS-7376
https://issues.jenkins-ci.org/browse/JENKINS-13910
https://issues.jenkins-ci.org/browse/JENKINS-7445
https://issues.jenkins-ci.org/browse/JENKINS-26660
https://issues.jenkins-ci.org/browse/JENKINS-27625
https://issues.jenkins-ci.org/browse/JENKINS-27082

The most upvoted request for the git plugin asks for credential support in
submodules:


Mark Waite

On Fri, Apr 24, 2015 at 3:46 AM Tomhe <tom...@gmail.com> wrote:

> In some circumstances the git plugin fails during submodule update for us:
>
>
> stderr: error: The following untracked working tree files would be 
> overwritten by checkout:   tool/scons/scons-LICENSE        
> tool/scons/scons-README tool/scons/scons-time.py        tool/scons/scons.py   
>   tool/scons/sconsign.py  tool/scons/site_scons/site_init.py      
> tool/scons/site_scons/site_tools/codecheck.py   
> tool/scons/site_scons/site_tools/doxygen.py     
> tool/scons/site_scons/site_tools/metrics.py     
> tool/scons/site_scons/site_tools/qac.py 
> tool/scons/site_scons/utilities.pyPlease move or remove them before you can 
> switch branches.Aborting
>
>
> Is it possible to configure the plugin to force the update of the submodules?
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/358d5332-21d1-4124-8169-418c704aa211%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/358d5332-21d1-4124-8169-418c704aa211%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtHvbJO%2BUprNw-duTyqmJ%3DYToYHsNk1BY1kJefCAgLjSfg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to