How to use Jenkins to manage a repository from Github with a submodule from Bitbucket?
It is a convenience that Jenkins will pull from git for you. With such a complex setup as needing to pull from two repos you can simply use a pipeline job that runs "sh" to explicitly git checkout the code and pull the submodules:

sh "git checkout ${custom_env_var} ${custom_parameter}


The good news with this slightly manual approach is that you can debug the sh commands to run on a dev server and cut paste them straight into a pipeline. Just start a “sh” session (usually it runs bash) and test the commands.