That's a very reasonable way of doing things. Be sure that the checkout of the additional repository is performed in a different directory than the original checkout. For example, it could be in a new subdirectory inside the original checkout directory or it could be in another workspace.
dir('my-subdirectory') { checkout .... needed options ... } There are various examples available. I have a scripted pipeline example <https://github.com/MarkEWaite/jenkins-bugs/blob/0e5da043baa1249f306fbda2e87cc2fb12ac902f/Jenkinsfile#L18> and a declarative pipeline example <https://github.com/MarkEWaite/jenkins-bugs/blob/576e3ea0e9d9eb93970fe5d144ed86b623c22994/Jenkinsfile#L17> (though that one uses the outmoded `git` step instead of the modern `checkout` step) in case they help you. Mark Waite On Tue, May 19, 2020 at 6:13 AM Pete Kane <p...@pjksolutions.com> wrote: > Title says it all really - I have an existing Pipeline SCM job setup which > utilises a Jenkins file in my Github repo ( the Jenkinsfile is itself a > pipeline ) All works perfectly. > > I want to split my current repo ( seperation of concerns reasons ) into > two repos but still use the Jenkinsfile to pull them both into one build ( > does this make sense ? ) is this the correct way of doing things ? > > TIA > > -- > 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/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAO49JtF21UCznKxs51ctwYKn0tHyx%3DNgQCTVwgnTe7JwYTePLA%40mail.gmail.com.