|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthudson.model.listeners.RunListener<hudson.model.Run>
net.praqma.jenkins.configrotator.ConfigurationRotatorRunListener
@Extension public class ConfigurationRotatorRunListener
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
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface hudson.ExtensionPoint |
|---|
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson |
| Field Summary |
|---|
| Fields inherited from class hudson.model.listeners.RunListener |
|---|
LISTENERS, targetType |
| Constructor Summary | |
|---|---|
ConfigurationRotatorRunListener()
|
|
| Method Summary | |
|---|---|
void |
onCompleted(hudson.model.Run run,
hudson.model.TaskListener listener)
Run listener for ConfigurationRotator jobs that does atom feed writing for the results. |
| Methods inherited from class hudson.model.listeners.RunListener |
|---|
all, fireCompleted, fireDeleted, fireFinalized, fireStarted, onDeleted, onFinalized, onStarted, register, setUpEnvironment, unregister |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConfigurationRotatorRunListener()
| Method Detail |
|---|
public void onCompleted(hudson.model.Run run,
hudson.model.TaskListener listener)
onCompleted in class hudson.model.listeners.RunListener<hudson.model.Run>run - listener -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||