Jenkins building a product consisting of many Maven projects? (with Jenkins Pipeline plugin?)

43 views
Skip to first unread message

Marnix Klooster

unread,
Apr 25, 2016, 3:12:50 PM4/25/16
to Jenkins Users
Hi all,

(Apologies for crossposting my Stack Overflow question (http://stackoverflow.com/q/36624122/223837) here.)

Basically my question is: how best to configure Jenkins for building a product which consists of many interdependent Maven projects?

So we have a large product, and which was divided into separate Maven projects to keep it manageable.  But it is always released as a single whole, so when one project is changed we like to build all dependent projects down to the end product.

Can the Jenkins Pipeline plug-in help us here?  We were thinking about creating a single pom-file-depencency0analyzing job which would build the Maven projects in the correct order.

Thanks for any and all input!

Groetjes,
 <><
Marnix

Karl Davis

unread,
Apr 27, 2016, 3:12:31 PM4/27/16
to Jenkins Users
Prior to the pipeline/Jenkinsfile modus operandi, I would have done the following:

1. Created Jenkins "Maven project" jobs for each separate project, with triggers/hooks set to build them when changes are found.
2. Used the builtin triggers to "Build whenever a dependency changes" to handle the build chaining.

However, I haven't found any analogue for those builtin triggers in the pipeline world. Instead, I just add a manual trigger to my downstream jobs in the upstream Jenkinsfiles. Something like the following:

// ... actual build, above

stage
'Trigger Downstream'
build job
: '../some-downstream-project/master', wait: false

Perhaps someone else here has a better suggestion, but that's my current SOP.
Reply all
Reply to author
Forward
0 new messages