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 different tasks you want to do with a single repo that don't make sense 
as one pipeline job that runs together (building/testing versus a nightly 
cron-type task that runs in the repo).

It is reasonable that a Jenkinsfile corresponds to a single Pipeline job, 
because these are often associated with and run via a Pipeline job which 
isn't a logical "parent" of these seed jobs. However, a great place for 
this enhancement would be the Github Org / Bitbucket plugins that scan 
repositories for Jenkinsfiles and are already in the place of creating 
multiple Pipeline jobs.

My proposal would be: add a configuration option for the Github and 
Bitbucket plugins which scan organizations for Jenkinsfiles. So, "Project 
Recognizers -> Pipeline Jenkinsfile" would get a box for this which 
defaults to "Jenkinsfile". Some logical configuration examples might be, 
"Jenkinsfiles/*", "**/Jenkinsfile", "Jenkinsfile-*". Then the 
Github/Bitbucket plugins can be pointed at an org, or just one repository, 
and multiple Jenkinsfiles can exist which define different Pipeline jobs.

Bartłomiej and Alex, would something like this satisfy your use cases as 
well?

- Michael

On Sunday, May 29, 2016 at 12:47:40 PM UTC-5, Bartłomiej Sacharski wrote:
>
> 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 pipeline.
>
> Is it possible to define multiple pipelines in a single Jenkinsfile? Or 
> maybe there's undocumented functionality for .jenkinsfile extension to 
> handle such cases?
>

-- 
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/41de15f2-5341-4a62-aac3-6d3040c7119b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to