com.chikli.hudson.plugin.naginator
Class NaginatorPublisher

java.lang.Object
  extended by hudson.tasks.BuildStepCompatibilityLayer
      extended by hudson.tasks.Publisher
          extended by hudson.tasks.Notifier
              extended by com.chikli.hudson.plugin.naginator.NaginatorPublisher
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.tasks.Publisher>, hudson.tasks.BuildStep

public class NaginatorPublisher
extends hudson.tasks.Notifier

Reschedules a build if the current one fails.

Author:
Nayan Hajratwala

Nested Class Summary
static class NaginatorPublisher.DescriptorImpl
          Descriptor for NaginatorPublisher.
 
Nested classes/interfaces inherited from class hudson.tasks.Publisher
hudson.tasks.Publisher.DescriptorExtensionListImpl
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList
 
Field Summary
static NaginatorListener LISTENER
           
 
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
 
Constructor Summary
NaginatorPublisher(String regexpForRerun, boolean rerunIfUnstable, boolean checkRegexp)
           
NaginatorPublisher(String regexpForRerun, boolean rerunIfUnstable, boolean rerunMatrixPart, boolean checkRegexp, boolean regexpForMatrixParent, int maxSchedule, ScheduleDelay delay)
           
NaginatorPublisher(String regexpForRerun, boolean rerunIfUnstable, boolean rerunMatrixPart, boolean checkRegexp, int maxSchedule, ScheduleDelay delay)
          backward compatible constructor.
 
Method Summary
 ScheduleDelay getDelay()
           
 NaginatorPublisher.DescriptorImpl getDescriptor()
           
 int getMaxSchedule()
           
 String getRegexpForRerun()
           
 hudson.tasks.BuildStepMonitor getRequiredMonitorService()
           
 boolean isCheckRegexp()
           
 boolean isRegexpForMatrixParent()
          Returns whether apply the regexp to the matrix parent instead of matrix children.
 boolean isRerunIfUnstable()
           
 boolean isRerunMatrixPart()
           
 boolean perform(hudson.model.AbstractBuild<?,?> build, hudson.Launcher launcher, hudson.model.BuildListener listener)
           
 Object readResolve()
           
 
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
 
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, prebuild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LISTENER

@Extension
public static final NaginatorListener LISTENER
Constructor Detail

NaginatorPublisher

public NaginatorPublisher(String regexpForRerun,
                          boolean rerunIfUnstable,
                          boolean checkRegexp)

NaginatorPublisher

public NaginatorPublisher(String regexpForRerun,
                          boolean rerunIfUnstable,
                          boolean rerunMatrixPart,
                          boolean checkRegexp,
                          int maxSchedule,
                          ScheduleDelay delay)
backward compatible constructor. Watch that regexpForMatrixParent gets true for the backward compatibility.


NaginatorPublisher

@DataBoundConstructor
public NaginatorPublisher(String regexpForRerun,
                                               boolean rerunIfUnstable,
                                               boolean rerunMatrixPart,
                                               boolean checkRegexp,
                                               boolean regexpForMatrixParent,
                                               int maxSchedule,
                                               ScheduleDelay delay)
Since:
1.16
Method Detail

readResolve

public Object readResolve()

isRerunIfUnstable

public boolean isRerunIfUnstable()

isRerunMatrixPart

public boolean isRerunMatrixPart()

isCheckRegexp

public boolean isCheckRegexp()

isRegexpForMatrixParent

public boolean isRegexpForMatrixParent()
Returns whether apply the regexp to the matrix parent instead of matrix children. The default is false for naginator-plugin >= 1.16 though true for configurations upgraded from naginator-plugin < 1.16.

Returns:
Returns whether apply the regexp to the matrix parent instead of matrix children
Since:
1.16

getRegexpForRerun

public String getRegexpForRerun()

getDelay

public ScheduleDelay getDelay()

getMaxSchedule

public int getMaxSchedule()

perform

public boolean perform(hudson.model.AbstractBuild<?,?> build,
                       hudson.Launcher launcher,
                       hudson.model.BuildListener listener)
                throws InterruptedException,
                       IOException
Specified by:
perform in interface hudson.tasks.BuildStep
Overrides:
perform in class hudson.tasks.BuildStepCompatibilityLayer
Throws:
InterruptedException
IOException

getRequiredMonitorService

public hudson.tasks.BuildStepMonitor getRequiredMonitorService()

getDescriptor

public NaginatorPublisher.DescriptorImpl getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<hudson.tasks.Publisher>
Overrides:
getDescriptor in class hudson.tasks.Notifier


Copyright © 2004-2015. All Rights Reserved.