Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Aggregate multiple upstream SCM changes in downstream job

On my current project, I have several dozen "sub-projects", each with trunk and branches (legacy setup, can't change it)

There are multiple commits on a branch, let's say 5, and then a branch is reintegrated to trunk. When a branch is reintegrated to trunk, it triggers trunk build as a downstream job.

I need this downstream trunk build to show all upstream SCM changes since last reintegration

I've used Display Upstream Changes plugin, however that only displays the last upstream commit in corresponding trunk build.

I've also used All Changes plugin. It does allow me to see "aggregate" list of upstream commits (either by date, promotion or number), but I cannot post these to downstream job.

Note: using SVN for SCM

Alternatively

Alternatively, if there is a way to include "merged revisions" in the SCM changelist, that would solve my issue as well

like image 974
Slav Avatar asked Jul 30 '18 20:07

Slav


1 Answers

Jenkins naturally shows changes on a job.

A downstream job is linked only in a workflow sense. Do Job B after Job A. Linking two jobs in this way does not extend to showing changes.

Option 1

MultiJob Plugin

Option 2

You could get the list of changes in job A using groovy like this and pass it to Job B as a parameter to do something with. (Like print out to an HTML file and publish to the dashboard of Job B with the HTMLPublisher plugin).

like image 156
Andrew Gray Avatar answered Sep 21 '22 01:09

Andrew Gray