Class PitPublisher
java.lang.Object
hudson.tasks.BuildStepCompatibilityLayer
hudson.tasks.Publisher
hudson.tasks.Recorder
org.jenkinsci.plugins.pitmutation.PitPublisher
- All Implemented Interfaces:
hudson.ExtensionPoint,hudson.model.Describable<hudson.tasks.Publisher>,hudson.tasks.BuildStep,jenkins.tasks.SimpleBuildStep
public class PitPublisher
extends hudson.tasks.Recorder
implements jenkins.tasks.SimpleBuildStep
The type Pit publisher.
- Author:
- edward
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPitPublisher.DescriptorImplThe type Descriptor.static classPitPublisher.ParseReportCallableThe type Parse report callable.Nested classes/interfaces inherited from class hudson.tasks.Publisher
hudson.tasks.Publisher.DescriptorExtensionListImplNested classes/interfaces inherited from interface hudson.tasks.BuildStep
hudson.tasks.BuildStep.PublisherList -
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description PitPublisher()Instantiates a new Pit publisher with Default-Values.protectedPitPublisher(String mutationStatsFile, float minimumKillRatio, boolean killRatioMustImprove)Instantiates a new Pit publisher. -
Method Summary
Modifier and Type Method Description hudson.model.ResultdecideBuildResult(PitBuildAction action)Decide build result result.booleangetKillRatioMustImprove()Required by plugin configfloatgetMinimumKillRatio()Required by plugin configStringgetMutationStatsFile()Required by plugin confighudson.model.ActiongetProjectAction(hudson.model.AbstractProject<?,?> project)hudson.tasks.BuildStepMonitorgetRequiredMonitorService()voidperform(hudson.model.Run<?,?> build, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener)voidsetKillRatioMustImprove(boolean killRatioMustImprove)voidsetMinimumKillRatio(float minimumKillRatio)voidsetMutationStatsFile(String mutationStatsFile)Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuildMethods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectActions, perform, perform, prebuild
-
Constructor Details
-
PitPublisher
protected PitPublisher(String mutationStatsFile, float minimumKillRatio, boolean killRatioMustImprove)Instantiates a new Pit publisher.- Parameters:
mutationStatsFile- the mutation stats fileminimumKillRatio- the minimum kill ratiokillRatioMustImprove- the kill ratio must improve
-
PitPublisher
@DataBoundConstructor public PitPublisher()Instantiates a new Pit publisher with Default-Values.mutationStatsFileis set to**{@literal /}target/pit-reports/**{@literal /}mutations.xml,minimumKillRatiois set to0.0,killRatioMustImproveis set tofalse,
-
-
Method Details
-
setMutationStatsFile
-
setMinimumKillRatio
@DataBoundSetter public void setMinimumKillRatio(float minimumKillRatio) -
setKillRatioMustImprove
@DataBoundSetter public void setKillRatioMustImprove(boolean killRatioMustImprove) -
perform
public void perform(@Nonnull hudson.model.Run<?,?> build, @Nonnull hudson.FilePath workspace, @Nonnull hudson.Launcher launcher, @Nonnull hudson.model.TaskListener listener) throws InterruptedException, IOException- Specified by:
performin interfacejenkins.tasks.SimpleBuildStep- Throws:
InterruptedExceptionIOException
-
getProjectAction
public hudson.model.Action getProjectAction(hudson.model.AbstractProject<?,?> project)- Specified by:
getProjectActionin interfacehudson.tasks.BuildStep- Overrides:
getProjectActionin classhudson.tasks.BuildStepCompatibilityLayer
-
decideBuildResult
Decide build result result.- Parameters:
action- the action- Returns:
- the worst result from all conditions
-
getMinimumKillRatio
public float getMinimumKillRatio()Required by plugin config- Returns:
- the minimum kill ratio
-
getKillRatioMustImprove
public boolean getKillRatioMustImprove()Required by plugin config- Returns:
- the kill ratio must improve
-
getMutationStatsFile
Required by plugin config- Returns:
- the mutation stats file
-
getRequiredMonitorService
public hudson.tasks.BuildStepMonitor getRequiredMonitorService()- Specified by:
getRequiredMonitorServicein interfacehudson.tasks.BuildStep
-