Re: Multiple pipelines in Jenkinsfile

2017-03-24 Thread Mike Rooney
I have not found a solution yet but I'd love to know if there is one. Current best practice seems to be to have a Jenkinsfile which triggers Job DSL to process DSL files located in a subdirectory, so at least they are all organized in your repo and Jenkinsfile serves as the single point of entry. Y

Re: Multiple pipelines in Jenkinsfile

2017-03-23 Thread Joshua Noble
Has anyone been able to make any progress on this? I have a new Jenkins 2 cluster up and running, and I've created declarative Jenkinsfile pipelines for each app repo. This works excellent for building all app branches and PR's. However, we have some more generic parameterized deploy jobs that

Re: Multiple pipelines in Jenkinsfile

2016-10-03 Thread Sorin Ionuț Sbârnea
Did you finish your implementation? Groovy is far from being my native language and it would be really helpful if you could share a snippet that is doing the subdirectory Jenkinsfile discovery and loading. On Thursday, July 21, 2016 at 1:43:18 AM UTC+1, slide wrote: > > The way I am planning on

Re: Multiple pipelines in Jenkinsfile

2016-07-22 Thread Wayne Warren
On Thursday, July 21, 2016 at 9:42:58 AM UTC-7, Alex Kessinger wrote: > > I've tried the seed job-dsl method previously. Some automation was better > then no automation, but I think the Jenkinsfile in repo is even better. If > I make a change to the Jenkinsfile, that change can be isolated in e

Re: Multiple pipelines in Jenkinsfile

2016-07-21 Thread Mike Rooney
On Thu, Jul 21, 2016 at 11:42 AM, alex kessinger wrote: > I've tried the seed job-dsl method previously. Some automation was better > then no automation, but I think the Jenkinsfile in repo is even better. If > I make a change to the Jenkinsfile, that change can be isolated in each > environment/

Re: Multiple pipelines in Jenkinsfile

2016-07-21 Thread alex kessinger
I've tried the seed job-dsl method previously. Some automation was better then no automation, but I think the Jenkinsfile in repo is even better. If I make a change to the Jenkinsfile, that change can be isolated in each environment/branch until it has been promoted to next step. If I have one mast

Re: Multiple pipelines in Jenkinsfile

2016-07-21 Thread Wayne Warren
Sorry for chiming in late here, but I have recently been evaluating Jenkins Pipeline Plugin for use at my workplace and have considered the very problem you are describing in this thread--what if a given source repo has multiple Pipeline groovy scripts it wants to use for different purposes? T

Re: Multiple pipelines in Jenkinsfile

2016-07-20 Thread Slide
The way I am planning on doing this is with the findFiles and load functions. I'll use findFiles in my Jenkinsfile to look for other build files further in the repo and create jobs from those to run. The other files will not necessarily be the same setup as a Jenkinsfile, but will use the pipeline

Re: Multiple pipelines in Jenkinsfile

2016-07-20 Thread Alex Kessinger
Mike, I'd just like to chime in and say that makes a lot of sense to me. As others have noted their can be times when you want multiple pipelines with a repo. My own specific use case is that I'd like to be able to trigger a rollback pipeline. On Tuesday, July 12, 2016 at 12:16:27 PM UTC-6, Mik

Re: Multiple pipelines in Jenkinsfile

2016-07-20 Thread Eric Parton
I'm in the same boat you are. My organization keeps several projects within a single repository and it would be great to have the ability to give each of them their own Jenkinsfile and (multi-branch) pipeline. On Tuesday, July 12, 2016 at 2:16:27 PM UTC-4, Mike Rooney wrote: > > This need makes

Re: Multiple pipelines in Jenkinsfile

2016-07-12 Thread Bartłomiej Sacharski
On Tuesday, July 12, 2016 at 8:16:27 PM UTC+2, Mike Rooney wrote: > > This need makes a lot of sense to us, where we have a couple related > sub-projects (as sub directories) in a single repository. It makes sense > that they each have their own pipeline jobs and can run on different > schedul

Re: Multiple pipelines in Jenkinsfile

2016-07-12 Thread Mike Rooney
This need makes a lot of sense to us, where we have a couple related sub-projects (as sub directories) in a single repository. It makes sense that they each have their own pipeline jobs and can run on different schedules. I've also seen cases similar to Alex's (hi Alex!) where there are differe

Re: Multiple pipelines in Jenkinsfile

2016-06-28 Thread Michael Neale
If by same DSL, you mean the pipeline script (DSL) - yes, you can do stand alone pipeline jobs, that aren't tied to any specific repo (and aren't multibranch aware). They can be triggered via various means, take parameters etc. But I may be misunderstanding the question. Another pattern I hav

Re: Multiple pipelines in Jenkinsfile

2016-06-28 Thread Patrick Wolf
Alex, Do you multiple jobs for every branch in the repo? A different Jenkinsfile for each job type? There are a couple of options that I can think of: 1. You can use the env.BRANCH_NAME to determine what steps happen in the Pipeline. 2. You could use the commit message on the branch to determine

Re: Multiple pipelines in Jenkinsfile

2016-06-28 Thread Alex Ehlke
We've been interested in having multiple "pipelines" per repo primarily for operational tasks that are independent of delivery. A couple examples: daily logical backups; some jobs that are manually triggered to manage production services in the event of an outage. If it's the case that Jenkinsf

Re: Multiple pipelines in Jenkinsfile

2016-05-30 Thread Michael Neale
One jenkinsfile is one "pipeline" - what you may have done with many jobs in the past can be done with one pipeline. it can be quite rich if you need it to be. You can call other "jobs" from a Jenkinsfile, but I am not sure if that is what you mean. On Monday, May 30, 2016 at 3:47:40 AM UT

Re: Multiple pipelines in Jenkinsfile

2016-05-30 Thread Bartłomiej Sacharski
Thanks. Will look into that. On Monday, May 30, 2016 at 7:42:34 PM UTC+2, Norbert Lange wrote: > > So you have a git repository with pipeline (as script) and want to run > them all? > > Its possible, but Its somewhat a messy syntax. > # global variable > def Myclosure > > Node { > # has to be in

Re: Multiple pipelines in Jenkinsfile

2016-05-30 Thread Norbert Lange
So you have a git repository with pipeline (as script) and want to run them all? Its possible, but Its somewhat a messy syntax. # global variable def Myclosure Node { # has to be in a node Checkout scripts Myclosure = # load scripts and call them } # call the closure. Myclosure() See triggering

Re: Multiple pipelines in Jenkinsfile

2016-05-30 Thread Norbert Lange
So you have a git repository with pipeline (as script) and want to run them all? Its possible, but Its somewhat a messy syntax. # global variable def Myclosure Node { # has to be in a node Checkout scripts Myclosure = # load scripts and call them } # call the closure. Myclosure() See triggering

Re: Multiple pipelines in Jenkinsfile

2016-05-30 Thread Bartłomiej Sacharski
Basically, I would like to define multiple builds (different pipelines) with different stages and keep them in Jenkinsfile(s) in the repo. On Monday, May 30, 2016 at 1:03:10 PM UTC+2, Norbert Lange wrote: > > Sorry, its not really clear to me what you expect. > 1 Build = one Pipeline (execution)

Re: Multiple pipelines in Jenkinsfile

2016-05-30 Thread Norbert Lange
Sorry, its not really clear to me what you expect. 1 Build = one Pipeline (execution) This Pipeline can be flexible and seperated horizontally with stages, and vertically with parallel execution. Further, what will be ultimately run can be scripted from multiple scripts (some could be "pipelines

Multiple pipelines in Jenkinsfile

2016-05-29 Thread Bartłomiej Sacharski
I'm really hyped about the Jenkinsfiles - they make it much much easier to document and preserve project configuration. However, all the examples that I've seen seem to use single pipeline. I've tried to define different stages in separate node blocks, however they still were seen as a single pip