hudson.plugins.logfilesizechecker
Class LogfilesizecheckerWrapper

java.lang.Object
  extended by hudson.model.AbstractDescribableImpl<hudson.tasks.BuildWrapper>
      extended by hudson.tasks.BuildWrapper
          extended by hudson.plugins.logfilesizechecker.LogfilesizecheckerWrapper
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.BuildWrapper>

public class LogfilesizecheckerWrapper
extends hudson.tasks.BuildWrapper

BuildWrapper that terminates a build if its log file size is too big.

Author:
Stefan Brausch

Nested Class Summary
static class LogfilesizecheckerWrapper.DescriptorImpl
          The Descriptor for the BuildWrapper.
 
Nested classes/interfaces inherited from class hudson.tasks.BuildWrapper
hudson.tasks.BuildWrapper.Environment
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
static LogfilesizecheckerWrapper.DescriptorImpl DESCRIPTOR
          Creates descriptor for the BuildWrapper.
 boolean failBuild
          Fail the build rather than aborting it.
 int maxLogSize
          If the log file for the build has more MB, it will be terminated.
 boolean setOwn
          Set your own max size instaed of using the default.
 
Constructor Summary
LogfilesizecheckerWrapper(int maxLogSize, boolean failBuild, boolean setOwn)
          Contructor for data binding of form data.
 
Method Summary
 hudson.model.Descriptor<hudson.tasks.BuildWrapper> getDescriptor()
           
 hudson.tasks.BuildWrapper.Environment setUp(hudson.model.AbstractBuild build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 
Methods inherited from class hudson.tasks.BuildWrapper
all, decorateLauncher, decorateLogger, getProjectAction, getProjectActions, makeBuildVariables, makeSensitiveBuildVariables, preCheckout, setUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

setOwn

public boolean setOwn
Set your own max size instaed of using the default.


maxLogSize

public int maxLogSize
If the log file for the build has more MB, it will be terminated.


failBuild

public boolean failBuild
Fail the build rather than aborting it.


DESCRIPTOR

@Extension
public static final LogfilesizecheckerWrapper.DescriptorImpl DESCRIPTOR
Creates descriptor for the BuildWrapper.

Constructor Detail

LogfilesizecheckerWrapper

@DataBoundConstructor
public LogfilesizecheckerWrapper(int maxLogSize,
                                                      boolean failBuild,
                                                      boolean setOwn)
Contructor for data binding of form data.

Parameters:
maxLogSize - job specific maximum log size
failBuild - true if the build should be marked failed instead of aborted
setOwn - true if a job specific log size is set, false if global setting is used
Method Detail

setUp

public hudson.tasks.BuildWrapper.Environment setUp(hudson.model.AbstractBuild build,
                                                   hudson.Launcher launcher,
                                                   hudson.model.BuildListener listener)
                                            throws IOException
Overrides:
setUp in class hudson.tasks.BuildWrapper
Throws:
IOException

getDescriptor

public hudson.model.Descriptor<hudson.tasks.BuildWrapper> getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.BuildWrapper>
Overrides:
getDescriptor in class hudson.model.AbstractDescribableImpl<hudson.tasks.BuildWrapper>


Copyright © 2004-2012. All Rights Reserved.