hudson.model.listeners.RunListener Java Examples

The following examples show how to use hudson.model.listeners.RunListener. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RunLoadCounter.java    From jenkins-test-harness with MIT License 5 votes vote down vote up
/**
 * Prepares a new project to be measured.
 * Usually called before starting builds, but may also be called retroactively.
 * @param project a project of any kind
 * @throws IOException if preparations fail
 */
public static void prepare(LazyBuildMixIn.LazyLoadingJob<?, ?> project) throws IOException {
    ExtensionList.lookup(RunListener.class).get(MarkerAdder.class).register((Job) project);
    for (Run<?, ?> build : project.getLazyBuildMixIn()._getRuns()) {
        Marker.add(build);
        build.save();
    }
}