Pull two repos into one build

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Pull two repos into one build

Pete Kane
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Pull two repos into one build

Mark Waite-2
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 and a declarative pipeline example (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 <[hidden email]> 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtF21UCznKxs51ctwYKn0tHyx%3DNgQCTVwgnTe7JwYTePLA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Pull two repos into one build

Felix Dorner
In reply to this post by Pete Kane
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 <[hidden email]> 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com.

--
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 [hidden email].
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.
Reply | Threaded
Open this post in threaded view
|

Re: Pull two repos into one build

Pete Kane
In reply to this post by Mark Waite-2
Hi Mark, thanks for replying I should of mentioned I'm a newbie to Jenkins so your examples are a tad overwhelming :-) I actually got Jenkins to build successfuly but it aint pretty.

pipeline{
    agent any
    environment
{
       
APIproject = "./MyAPI//API.csproj"
        APIPublishPath = "//home//myname//Jenkins//Linux-ARM64//"
       
Commonproject = "./Common.csproj"
       
CommonPublishPath = "//home//myname//Jenkins//Linux-ARM64//Common//"
  
}
       
  stages
{
  stage
('Checkout Common') {
        steps
{
               git
'[hidden email]:myname/Common.git'
         
}
   
}
   
    stage
('Build Common'){
     steps
{
      sh
"dotnet build ${env.Commonproject} -c Release -r linux-arm64 -o ${env.CommonPublishPath}"
     
}
   
}
    stage
('Checkout API') {
        steps
{
            dir
('API')
           
{
         git
'[hidden email]:myname/API.git'
           
}
       
}
   
}
    stage
('Build API'){
     steps
{
      sh
"dotnet build ${env.APIproject} -c Release -r linux-arm64 -o ${env.APIPublishPath}"
     
}
   
}
 
}
}



What I had to do which I don't like doing is add a hard coded reference in my API.csproj to the Common.dll in my buils output folder - but it works and hopefully I'll get some tips on here which will help me achieve this in an elegant manner
 

On Tuesday, 19 May 2020 13:34:38 UTC+1, Mark Waite wrote:
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 <a href="https://github.com/MarkEWaite/jenkins-bugs/blob/0e5da043baa1249f306fbda2e87cc2fb12ac902f/Jenkinsfile#L18" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMarkEWaite%2Fjenkins-bugs%2Fblob%2F0e5da043baa1249f306fbda2e87cc2fb12ac902f%2FJenkinsfile%23L18\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFJRBib7WxojzrNULW160ee84uRTQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMarkEWaite%2Fjenkins-bugs%2Fblob%2F0e5da043baa1249f306fbda2e87cc2fb12ac902f%2FJenkinsfile%23L18\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFJRBib7WxojzrNULW160ee84uRTQ&#39;;return true;">scripted pipeline example and a <a href="https://github.com/MarkEWaite/jenkins-bugs/blob/576e3ea0e9d9eb93970fe5d144ed86b623c22994/Jenkinsfile#L17" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMarkEWaite%2Fjenkins-bugs%2Fblob%2F576e3ea0e9d9eb93970fe5d144ed86b623c22994%2FJenkinsfile%23L17\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxJmgV73AZGqz7ln2ctC3QBsl3Iw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2FMarkEWaite%2Fjenkins-bugs%2Fblob%2F576e3ea0e9d9eb93970fe5d144ed86b623c22994%2FJenkinsfile%23L17\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFxJmgV73AZGqz7ln2ctC3QBsl3Iw&#39;;return true;">declarative pipeline example (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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="KE7I4JOKAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">pe...@...> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="KE7I4JOKAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/438f9439-1f8e-41ae-a537-4fa8da84831f%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Pull two repos into one build

Pete Kane
In reply to this post by Felix Dorner
Hi Felix, thanks for replying I think I have a steep learning curve ahead learning this scripting syntax - I've been a paid programmer / analyst / developer / software engineer for 35 + years but I've never had to use Jenkins or its ilk - I have to say it's a cool piece of kit

On Tuesday, 19 May 2020 15:11:13 UTC+1, Felix Dorner wrote:
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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="DamF_9iPAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">pe...@...> 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 <a href="javascript:" rel="nofollow" target="_blank" gdf-obfuscated-mailto="DamF_9iPAgAJ" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3ead1a39-725e-4407-8be5-4fab7b2b0d98%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Pull two repos into one build

Mark Waite-2
In reply to this post by Pete Kane
Glad you're using Jenkins and declarative pipeline.  You may want to spend an hour watching a Declarative Pipeline video that Kohsuke Kawaguchi hosted with Tyler Johnson and me presenting some ideas that make it easier to succeed with declarative pipeline.

Specific comments are placed inline.

On Tue, May 19, 2020 at 8:31 AM Pete Kane <[hidden email]> wrote:
Hi Mark, thanks for replying I should of mentioned I'm a newbie to Jenkins so your examples are a tad overwhelming :-) I actually got Jenkins to build successfuly but it aint pretty.

pipeline{
    agent any
    environment
{
       
APIproject = "./MyAPI//API.csproj"
        APIPublishPath = "//home//myname//Jenkins//Linux-ARM64//"
       
Commonproject = "./Common.csproj"
       
CommonPublishPath = "//home//myname//Jenkins//Linux-ARM64//Common//"
  
}
       
  stages
{
  stage
('Checkout Common') {
        steps
{
               git
'[hidden email]:myname/Common.git'

Since you're using declarative pipeline, there is an implied checkout that happens already.  You don't need this 'git' step because declarative pipeline already assumed you would want a checkout and performed the initial checkout into the workspace.

Calling the git step at this location did not harm you, it just performed another 'fetch' (or two) that had been done only seconds before.
 

         
}
   
}
   
    stage
('Build Common'){
     steps
{
      sh
"dotnet build ${env.Commonproject} -c Release -r linux-arm64 -o ${env.CommonPublishPath}"
     
}
   
}
    stage
('Checkout API') {
        steps
{
            dir
('API')
           
{
         git
'[hidden email]:myname/API.git'

The 'git' step has been superseded by the more powerful and more capable 'checkout' step.  The Jenkins pipeline syntax generator ( https://your-jenkins.example.com/pipeline-syntax  ) will allow you to define the configuration you want and then generate the syntax you should use.  I believe that video clip includes a section on the pipeline syntax generator.

Since this is using 'ssh' protocol to access the git repository ([hidden email]:xx/yy.git), you should define a Jenkins credential which includes the private key used to access that repository.  Then reference that credential in this context.  If you don't do that, then all the agents will need to be configured to silently allow ssh access to the GitHub repository.  That works for small installations but does not work well for medium size or large installations.

Thanks,
Mark Waite

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGuTmibrGp2y%3DZcgk7J1staPQSk8yoX8Y%2BmA9rFd3X5Ew%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

RE: Pull two repos into one build

Jérôme Godbout
In reply to this post by Felix Dorner

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: [hidden email] <[hidden email]> On Behalf Of Felix Dorner
Sent: May 19, 2020 8:47 AM
To: [hidden email]
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 <[hidden email]> 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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com.

--
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 [hidden email].
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.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/YQBPR0101MB10746754662EAECCC0D7D143CDB90%40YQBPR0101MB1074.CANPRD01.PROD.OUTLOOK.COM.
Reply | Threaded
Open this post in threaded view
|

Re: Pull two repos into one build

Pete Kane
In reply to this post by Mark Waite-2
Hi Mark, I should have mentioned this is a new pipeline not my original SCM one ( which as you say has an implicit checkout )

On Tuesday, 19 May 2020 15:58:03 UTC+1, Mark Waite wrote:
Glad you're using Jenkins and declarative pipeline.  You may want to spend an hour watching a Declarative Pipeline video that Kohsuke Kawaguchi hosted with Tyler Johnson and me presenting some ideas that make it easier to succeed with declarative pipeline.

Specific comments are placed inline.

On Tue, May 19, 2020 at 8:31 AM Pete Kane <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="X1L0cGeSAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">pe...@...> wrote:
Hi Mark, thanks for replying I should of mentioned I'm a newbie to Jenkins so your examples are a tad overwhelming :-) I actually got Jenkins to build successfuly but it aint pretty.

pipeline{
    agent any
    environment
{
       
APIproject = "./MyAPI//API.csproj"
        APIPublishPath = "//home//myname//Jenkins//Linux-ARM64//"
       
Commonproject = "./Common.csproj"
       
CommonPublishPath = "//home//myname//Jenkins//Linux-ARM64//Common//"
  
}
       
  stages
{
  stage
('Checkout Common') {
        steps
{
               git
'[hidden email]:myname/Common.git'

Since you're using declarative pipeline, there is an implied checkout that happens already.  You don't need this 'git' step because declarative pipeline already assumed you would want a checkout and performed the initial checkout into the workspace.

Calling the git step at this location did not harm you, it just performed another 'fetch' (or two) that had been done only seconds before.
 

         
}
   
}
   
    stage
('Build Common'){
     steps
{
      sh
"dotnet build ${env.Commonproject} -c Release -r linux-arm64 -o ${env.CommonPublishPath}"
     
}
   
}
    stage
('Checkout API') {
        steps
{
            dir
('API')
           
{
         git
'[hidden email]:myname/API.git'

The 'git' step has been superseded by the more powerful and more capable 'checkout' step.  The Jenkins pipeline syntax generator ( <a href="https://your-jenkins.example.com/pipeline-syntax" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fyour-jenkins.example.com%2Fpipeline-syntax\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGZeXt0y15973QrXMfg8bfQYXLdgg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fyour-jenkins.example.com%2Fpipeline-syntax\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGZeXt0y15973QrXMfg8bfQYXLdgg&#39;;return true;">https://your-jenkins.example.com/pipeline-syntax  ) will allow you to define the configuration you want and then generate the syntax you should use.  I believe that video clip includes a section on the pipeline syntax generator.

Since this is using 'ssh' protocol to access the git repository ([hidden email]:xx/yy.git), you should define a Jenkins credential which includes the private key used to access that repository.  Then reference that credential in this context.  If you don't do that, then all the agents will need to be configured to silently allow ssh access to the GitHub repository.  That works for small installations but does not work well for medium size or large installations.

Thanks,
Mark Waite

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d56d0320-1562-46a6-9b9f-b6abaaa6b163%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Pull two repos into one build

Pete Kane
In reply to this post by Jérôme Godbout


On Tuesday, 19 May 2020 17:42:00 UTC+1, Jérôme Godbout wrote:

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: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="WnF9aROYAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WnF9aROYAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com> On Behalf Of Felix Dorner
Sent: May 19, 2020 8:47 AM
To: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="WnF9aROYAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com
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 <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="WnF9aROYAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">pe...@...> 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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="WnF9aROYAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;"> https://groups.google.com/d/msgid/jenkinsci-users/354e3634-2e36-4de8-9664-af47450fe906%40googlegroups.com.

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="WnF9aROYAgAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/CALG%2B_hAUn49Kp38C%3DD-T4803fe4Mz2OuTrJ%3D43yZSpBgcb%3DedA%40mail.gmail.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/CALG%2B_hAUn49Kp38C%3DD-T4803fe4Mz2OuTrJ%3D43yZSpBgcb%3DedA%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/CALG%2B_hAUn49Kp38C%3DD-T4803fe4Mz2OuTrJ%3D43yZSpBgcb%3DedA%40mail.gmail.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;"> https://groups.google.com/d/msgid/jenkinsci-users/CALG%2B_hAUn49Kp38C%3DD-T4803fe4Mz2OuTrJ%3D43yZSpBgcb%3DedA%40mail.gmail.com.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/d0578659-c6cc-4d2a-a815-39a492471801%40googlegroups.com.