Simply checkout into Agent workspace subfolder:
dir(“source1”){
checkout(…);
}
dir(“source2”){
checkout(…);
}
I do 3-4 checkout for my builds (my common jenkins tools libraries repos, my
provisioning repos, my source code and his submodules and sometimes some unit
tests repos). My jenkinsfile is also into the CI repos so I can update my C and
apply it on any version of the source code.
From: [email protected] <[email protected]> On
Behalf Of Felix Dorner
Sent: May 19, 2020 8:47 AM
To: [email protected]
Subject: Re: Pull two repos into one build
I used
options { skipDefaultCheckout() }
and then clone my projects into subdirectories with:
checkout([$class: 'GitSCM',
branches: [[name: "*/${env.BRANCH_NAME}"]],
doGenerateSubmoduleConfigurations: false,
extensions: [[$class: 'RelativeTargetDirectory',
relativeTargetDir: subdir1],
]]
///...
However, I did change that because I dont know how to handle pull requests in a
simple way with this approach. I now use git submodules,
so one is a submodule of the other.
Felix
On Tue, May 19, 2020, 14:13 Pete Kane
<[email protected]<mailto:[email protected]>> 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
[email protected]<mailto:[email protected]>.
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
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/CALG%2B_hAUn49Kp38C%3DD-T4803fe4Mz2OuTrJ%3D43yZSpBgcb%3DedA%40mail.gmail.com<https://groups.google.com/d/msgid/jenkinsci-users/CALG%2B_hAUn49Kp38C%3DD-T4803fe4Mz2OuTrJ%3D43yZSpBgcb%3DedA%40mail.gmail.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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/YQBPR0101MB10746754662EAECCC0D7D143CDB90%40YQBPR0101MB1074.CANPRD01.PROD.OUTLOOK.COM.