Jenkins multi-branch pipeline and specifying upstream projects

1,117 views
Skip to first unread message

Fred Clausen

unread,
Aug 10, 2016, 1:50:40 AM8/10/16
to Jenkins Users
Hello All,

We currently generate a lot of Jenkins jobs on a per Git branch basis using Jenkins job DSL; the multi-branch pipeline plugin looks like an interesting way to potentially get first-class job generation support using Jenkinsfiles and reduce the amount of Job DSL we maintain.

For example suppose we have libwidget and widget-server develop branch projects. When the libwidget build finishes then the widget-server job is triggered (for the develop branch). This applies to other branches too. This makes use of the "Build after other projects are built" setting to trigger builds upon completion of an upstream build (e.g. libwidget causes widget-server to be built).

It seems that the multi-branch pipeline plugin lacks the "Build after other projects are built" setting - how would we accomplish the above in the multi-branch pipeline build?

Regards,

Fred.

Greg Smith

unread,
Aug 10, 2016, 3:40:20 PM8/10/16
to Jenkins Users
Hi Fred,

Checkout the "properties" setting in the latest version of all plugins.  It was added pretty recently, but I'm not sure which plugin added it.

You can set properties for the multibranch project in the Jenkinsfile directly, and set up a build trigger on another project being built.  You can use the snippet generator to build the example groovy code to setup the triggers.

Cheers,
Greg

Auto Generated Inline Image 1
Reply all
Reply to author
Forward
0 new messages