If you're using a Jenkins Pipeline, you can checkout multiple repositories so long as each repository is placed into its own directory in the workspace. You define the checkout, including the repository URL, the credentials, and the branch.
If you're not using a Jenkins Pipeline, you should not use multiple repositories. Yes, there are techniques like the multiple SCM plugin that will allow some multiple repository scenarios, but none of them work as well as Pipeline. Refer to https://github.com/MarkEWaite/jenkins-bugs/blob/526b36de2203f65ada40b9a606c7cba1cddcfa98/Jenkinsfile#L37 for one example. In that example, a checkout of a non-master branch is followed by a ws() { } block which then performs a checkout of the master branch inside the new workspace created by the 'ws() { } block. Mark Waite On Mon, Oct 1, 2018 at 5:49 PM <lancelyo...@gmail.com> wrote: > I have some builds that require multiple github repos. One contains build > scripts on master branch. ANother contains code on a different branch. > > I noticed the source code management settings in Jenkins there is a way to > add another repository but it only allows me to specify one branch. > > How can I add another repository to my build project? > > > > thanks in advance. > > -- > 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/7da67a84-b965-4a03-b6f0-a85f4d66543e%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/7da67a84-b965-4a03-b6f0-a85f4d66543e%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/CAO49JtG-J8nf2HGhXDYFTpS485La%3D2HzMqr47kEjauKzJmdKiA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.