git submodules + update to tip of branch (update --remote) + maven incremental builds (-pl list -amd)

116 views
Skip to first unread message

Jon Harper

unread,
May 5, 2017, 11:50:04 AM5/5/17
to Jenkins Users
Hi everyone,

I would like to know if my setup is supposed to work as configured. Has anyone tried and succeeded doing the following ?

I have:
- Some maven projects using git as SCM. Let's call these the base projects.
- A git repository containing only git submodules (the previous maven projects) and a pom.xml listing these modules. Let's call this the aggregator.
- A jenkins maven job configured for each base project, triggered by a push to their repo.
- A jenkins maven job for the aggregator, triggered by the execution of any of the base project jenkins jobs. I have configured git's advanced parameters "update submodules to tip of branch"

I expected a commit to one of the base project to trigger the associated jenkins job, and then trigger the reactor job with "-pl XXX -amd" with the submodule to the tip of the branch.

Right now, the behavior I see is what I described, except that the reactor job doesn't have the "-pl XXX -amd". It does build the latest modified base project source though (thank to the "tip of the branch" option).
Also, If I commit in the aggregator an update of a submodule, then in this case the next run does use "-pl XXX -amd".

So has anyone tried this ? If not, can anyone suggest an alternative ?

Thanks in advance,
Jon

ps: I saw the section "Autogenerate submodule configurations" on https://wiki.jenkins-ci.org/display/JENKINS/Git+Plugin, is this what is supposed to be used here ? If possible, I would like to avoid generating many commits... That is, I would like to keep using git submodules only as a simple way of keeping many submodules to the tip of their branches (with git submodule update --remote).

Jon Harper

unread,
May 9, 2017, 5:36:44 AM5/9/17
to Jenkins Users
Regarding the "Autogenerate submodule configurations" option of the jenkins git plugin, it was disabled in 2009 (see https://github.com/magnayn/Hudson-GIT-plugin/commit/850e3f1b9db2286b56c9426d64f0ed8eeed941d7 ), the docs were just never updated.

So I'm welcoming any suggestion :)
Reply all
Reply to author
Forward
0 new messages