One Jenkinsfile per repo in multi-branch workflows?

190 views
Skip to first unread message

David Aldrich

unread,
May 18, 2017, 10:38:28 AM5/18/17
to jenkins...@googlegroups.com

Hi

 

As the free-style Multi-Branch Project plugin is deprecated, I am experimenting with the Multibranch Pipeline job type.

 

With the Multi-Branch Project plugin it was possible to have multiple multi-branch jobs.  We took advantage of that and had multiple jobs to build different executables in the repo and to run different regression tests, with different polling periods.

 

It seems that the Multibranch Pipeline supports only one build script  per repo, defined by the JenkinsFile in the root directory.

 

This seems to me to be restrictive.  What is the thinking behind it and is it possible to define multiple multi-branch pipeline jobs per repo?

 

Best regards

 

David

 

Yotam Shapira

unread,
May 18, 2017, 4:47:59 PM5/18/17
to Jenkins Users
There seems to be some work done in this regard, but it seems to be lagging, so I can't tell if it's going to stay this way or not.
https://issues.jenkins-ci.org/plugins/servlet/mobile#issue/JENKINS-34561

David Aldrich

unread,
May 19, 2017, 3:34:14 AM5/19/17
to jenkins...@googlegroups.com
> There seems to be some work done in this regard, but it seems to be lagging,
> so I can't tell if it's going to stay this way or not.

Thanks for your answer. Good to know it is being worked on.

David

Matt Stave

unread,
May 19, 2017, 10:20:57 AM5/19/17
to Jenkins Users, David....@emea.nec.com
You can use a JobDSL statement in the Jenkinsfile in the root of your repo to generate other jobs.  Those jobs wouldn't be triggered by subsequent repo changes, unless you add a call to them in your main Jenkinsfile - they also could be triggered on-demand, through replay, a cron ...

--- Matt

Michael Kobit

unread,
May 19, 2017, 4:47:15 PM5/19/17
to Jenkins Users, David....@emea.nec.com

Be careful if you do use the job DSL as you will have to deal with Groovy sandbox permissions for job creation.


--
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-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/4b45b914-1cdf-4dfe-9076-330fea88798c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages