Take a look at Pipeline Global Library https://github.com/jenkinsci/workflow-cps-global-lib-plugin/blob/master/README.md
You can maintain all build logic within a global build script which is called from within each Jenkinsfile. You would still need a Jenkinsfile within each repository on all branches you wish to build, but you can keep a minimal content in each Jenkinsfile. fredag 19. august 2016 17.09.55 UTC+2 skrev Qazwart følgende: > > I have just started looking at using Pipelines. One of the reasons I liked > about Jenkins over CruiseControl was that Jenkins allowed you to quickly > setup a build using a web form rather than attempting to setup up an entire > process using an XML file. Pipelines feels a bit of a step back. > > However, I am intrigued about multi-branch Pipelines which would allow use > to create new Jenkins projects every time a new branch is created. No more > copying and modifying config.xml files to create new jobs. > > There are two issues. The first is that if you use Multi-branch Pipelines, > there’s no way to browse the working directory, or allowing a user to scrub > it if there’s an issue. The second is that I don’t want to maintain > multiple Jenkinsfiles — one for each project. Most of my projects would be > built using identical Jenkinsfiles. It would seem silly if I make a change > in one, I would have to checkout and change 40 other Jenkinsfiles to get > that same change. > > So, is there a way to browse the working directory? If not, I can live > with that. However, I’d like to know whether I can specify where a > Jenkinsfile exist in a multi-branch Pipeline (I can do that with other > types of Pipeline projects), or somehow read in a master Jenkinsfile from > another Jenkinsfile in another project. I could create a local Jenkinsfile > whose sole purpose is to call in the real Jenkinsfile. > > 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/2b529184-d038-4d21-9522-a26dba4fea04%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.