RunLister implements onCompleted method that runs for every job on Jenkins
when completed, thus we check if it is a CR job and harvest the result of
the configuration.
Design notes - using a runListener vs. notifier for writing feed
-----------------------------------------------------------------
http://jenkinshost/config-rotator shows a summary with atom-feed and links
for the feed for every configuration of component tried with the config-rotator
plug-in (from now denoted CR) on the Jenkins host.
That is every job using the plug-in could have a result that should be shown
in one or more feeds, thus we must "subscribe" or ensure these data are
collected.
We already decided for an easy format for storing the feed - one file per
component in the feed XML format.
The feed can be written easily from two places: a runlistener or from the
notifier part of CR.
We chose to implement this as a runlistener we find the runlistener way of
doing it more clear instead of using the notifier (the post build step).
We know there might be some concurrency problems writing the feed files
if a lots of build finish at the same time.
TODO: This will be handled later and implemented.
Writing feeds: we would have liked to use a fully tested and mature open
source library for writing feeds, and did a short searching and found to
large one: ROME and Apache Abdera
ROME though, seemed not to be maintained or changed for some time,
but seemed the easiest to use.
NONE of them did we succeed in use: both had weird classloader problems under
Jenkins (but not if using them alone). The problem seems to comes from Jenkins
making the hpi file, from splits of jar-files. Others have this problem,
and we do to with some internal libraries (cool test case not being able to
use setup.xml across projects).
Thus we ended up creating our own simple framework in praqmajutils