The multibranch plugin from version 2.15 does support custom names for the 
pipeline script so you can now have multiple multibranch projects on the same 
repo.

As for only building on changes applicable to the respective folders I’m not 
able to answer that. If each of these projects are changing independently 
however then afaik the accepted practice is to have each in their own repo.

From: Sorin Ionuț Sbârnea
Sent: 12 July 2017 10:54
To: Jenkins Users
Subject: Re: Multiple multibranch pipeline builds from a single repo

I am still looking for this because the use of JJB is a productivity killer but 
I didn't find an answer yet.

I did asked the same question at 
https://stackoverflow.com/questions/45054290/how-to-manage-multiple-jenkins-pipelines-from-a-single-repository
 hoping that this will allow us to find a better solution and to avoid getting 
the subject lost in a mailing list.

On Wednesday, April 13, 2016 at 5:25:51 AM UTC+1, mark.g...@urbanise.com wrote:
We are about to switch our CI builds to jenkins and I would like to make use of 
the multibranch builds but we have multiple projects in a single repo which (as 
far as I can tell) won't work with the multibranch stuff as we would need a 
Jenkinsfile per project, not one for the whole repo. 

Our repo looks something like:

/
  /libraryProject
    build.xml
  /projectA
    build.xml
  /projectB
    build.gradle

where libraryProject builds a library jar that is published externally (to a 
nexus repo). The projectA/B builds retrieve the artifact from that repo when 
they build - so in that sense they are independent builds.

Ideally, what I'd like is to be able to do is have a Jenkinsfile in each of the 
3 projects, and have a multibranch build for each of them. This would mean 
explicitly specifying the location of the Jenkinsfile per build (similar to how 
the current pipeline build works). The other thing that would be required is to 
only trigger the relevant build when repo changes (ie: if code under the 
projectA directory changed - only trigger the projectA multibranch build).

I don't think the above is possible at the moment (please let me know if I'm 
wrong), but can anyone suggest a way to achieve the same result (multiple 
multibranch pipeline builds from a single repo) with existing plugins? Or is 
what I'm trying to do not possible at the moment?

Thanks
-- 
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/2dc43d51-fc1c-4cd2-809a-ceae7e25e98f%40googlegroups.com.
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/59661843.150e1c0a.9d105.3c19%40mx.google.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to