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 class
PitPublisher.DescriptorImpl
The type Descriptor.static class
PitPublisher.ParseReportCallable
The type Parse report callable.Nested classes/interfaces inherited from class hudson.tasks.Publisher
hudson.tasks.Publisher.DescriptorExtensionListImpl
Nested 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.protected
PitPublisher(String mutationStatsFile, float minimumKillRatio, boolean killRatioMustImprove)
Instantiates a new Pit publisher. -
Method Summary
Modifier and Type Method Description hudson.model.Result
decideBuildResult(PitBuildAction action)
Decide build result result.boolean
getKillRatioMustImprove()
Required by plugin configfloat
getMinimumKillRatio()
Required by plugin configString
getMutationStatsFile()
Required by plugin confighudson.model.Action
getProjectAction(hudson.model.AbstractProject<?,?> project)
hudson.tasks.BuildStepMonitor
getRequiredMonitorService()
void
perform(hudson.model.Run<?,?> build, hudson.FilePath workspace, hudson.Launcher launcher, hudson.model.TaskListener listener)
void
setKillRatioMustImprove(boolean killRatioMustImprove)
void
setMinimumKillRatio(float minimumKillRatio)
void
setMutationStatsFile(String mutationStatsFile)
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
Methods 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.mutationStatsFile
is set to**{@literal /}target/pit-reports/**{@literal /}mutations.xml
,minimumKillRatio
is set to0.0
,killRatioMustImprove
is 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:
perform
in interfacejenkins.tasks.SimpleBuildStep
- Throws:
InterruptedException
IOException
-
getProjectAction
public hudson.model.Action getProjectAction(hudson.model.AbstractProject<?,?> project)- Specified by:
getProjectAction
in interfacehudson.tasks.BuildStep
- Overrides:
getProjectAction
in 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:
getRequiredMonitorService
in interfacehudson.tasks.BuildStep
-