Package hudson.plugins.jacoco
Class JacocoPublisher
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- hudson.plugins.jacoco.JacocoPublisher
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
,SimpleBuildStep
public class JacocoPublisher extends Recorder implements SimpleBuildStep
Publisher
that captures jacoco coverage reports.- Author:
- Kohsuke Kawaguchi, Jonathan Fuerth, Ognjen Bubalo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
JacocoPublisher.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
-
Constructor Summary
Constructors Constructor Description JacocoPublisher()
JacocoPublisher(String execPattern, String classPattern, String sourcePattern, String inclusionPattern, String exclusionPattern, boolean skipCopyOfSrcFiles, String maximumInstructionCoverage, String maximumBranchCoverage, String maximumComplexityCoverage, String maximumLineCoverage, String maximumMethodCoverage, String maximumClassCoverage, String minimumInstructionCoverage, String minimumBranchCoverage, String minimumComplexityCoverage, String minimumLineCoverage, String minimumMethodCoverage, String minimumClassCoverage, boolean changeBuildStatus, boolean runAlways, String deltaInstructionCoverage, String deltaBranchCoverage, String deltaComplexityCoverage, String deltaLineCoverage, String deltaMethodCoverage, String deltaClassCoverage, boolean buildOverBuild)
Deprecated.
-
Method Summary
-
Methods inherited from class hudson.tasks.Recorder
getDescriptor
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, perform, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, perform, prebuild
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Field Detail
-
includes
@Deprecated public transient String includes
Deprecated.Rule to be enforced. Can be null.TODO: define a configuration mechanism.
-
moduleNum
@Deprecated public transient int moduleNum
Deprecated.
-
-
Constructor Detail
-
JacocoPublisher
@DataBoundConstructor public JacocoPublisher()
-
JacocoPublisher
@Deprecated public JacocoPublisher(String execPattern, String classPattern, String sourcePattern, String inclusionPattern, String exclusionPattern, boolean skipCopyOfSrcFiles, String maximumInstructionCoverage, String maximumBranchCoverage, String maximumComplexityCoverage, String maximumLineCoverage, String maximumMethodCoverage, String maximumClassCoverage, String minimumInstructionCoverage, String minimumBranchCoverage, String minimumComplexityCoverage, String minimumLineCoverage, String minimumMethodCoverage, String minimumClassCoverage, boolean changeBuildStatus, boolean runAlways, String deltaInstructionCoverage, String deltaBranchCoverage, String deltaComplexityCoverage, String deltaLineCoverage, String deltaMethodCoverage, String deltaClassCoverage, boolean buildOverBuild)
Deprecated.Loads the configuration set by user.- Parameters:
execPattern
- deprecatedclassPattern
- deprecatedsourcePattern
- deprecatedinclusionPattern
- deprecatedexclusionPattern
- deprecatedskipCopyOfSrcFiles
- deprecatedmaximumInstructionCoverage
- deprecatedmaximumBranchCoverage
- deprecatedmaximumComplexityCoverage
- deprecatedmaximumLineCoverage
- deprecatedmaximumMethodCoverage
- deprecatedmaximumClassCoverage
- deprecatedminimumInstructionCoverage
- deprecatedminimumBranchCoverage
- deprecatedminimumComplexityCoverage
- deprecatedminimumLineCoverage
- deprecatedminimumMethodCoverage
- deprecatedminimumClassCoverage
- deprecatedchangeBuildStatus
- deprecatedrunAlways
- deprecateddeltaInstructionCoverage
- deprecateddeltaBranchCoverage
- deprecateddeltaComplexityCoverage
- deprecateddeltaLineCoverage
- deprecateddeltaMethodCoverage
- deprecateddeltaClassCoverage
- deprecatedbuildOverBuild
- deprecated
-
-
Method Detail
-
getExecPattern
public String getExecPattern()
-
getClassPattern
public String getClassPattern()
-
getSourcePattern
public String getSourcePattern()
-
getSourceExclusionPattern
public String getSourceExclusionPattern()
-
getSourceInclusionPattern
public String getSourceInclusionPattern()
-
getInclusionPattern
public String getInclusionPattern()
-
getExclusionPattern
public String getExclusionPattern()
-
isSkipCopyOfSrcFiles
public boolean isSkipCopyOfSrcFiles()
-
getMinimumInstructionCoverage
public String getMinimumInstructionCoverage()
-
getMinimumBranchCoverage
public String getMinimumBranchCoverage()
-
getMinimumComplexityCoverage
public String getMinimumComplexityCoverage()
-
getMinimumLineCoverage
public String getMinimumLineCoverage()
-
getMinimumMethodCoverage
public String getMinimumMethodCoverage()
-
getMinimumClassCoverage
public String getMinimumClassCoverage()
-
getMaximumInstructionCoverage
public String getMaximumInstructionCoverage()
-
getMaximumBranchCoverage
public String getMaximumBranchCoverage()
-
getMaximumComplexityCoverage
public String getMaximumComplexityCoverage()
-
getMaximumLineCoverage
public String getMaximumLineCoverage()
-
getMaximumMethodCoverage
public String getMaximumMethodCoverage()
-
getMaximumClassCoverage
public String getMaximumClassCoverage()
-
isChangeBuildStatus
public boolean isChangeBuildStatus()
-
getChangeBuildStatus
public boolean getChangeBuildStatus()
-
isRunAlways
public boolean isRunAlways()
-
getDeltaInstructionCoverage
public String getDeltaInstructionCoverage()
-
getDeltaBranchCoverage
public String getDeltaBranchCoverage()
-
getDeltaComplexityCoverage
public String getDeltaComplexityCoverage()
-
getDeltaLineCoverage
public String getDeltaLineCoverage()
-
getDeltaMethodCoverage
public String getDeltaMethodCoverage()
-
getDeltaClassCoverage
public String getDeltaClassCoverage()
-
isBuildOverBuild
public boolean isBuildOverBuild()
-
setExecPattern
@DataBoundSetter public void setExecPattern(String execPattern)
-
setClassPattern
@DataBoundSetter public void setClassPattern(String classPattern)
-
setSourcePattern
@DataBoundSetter public void setSourcePattern(String sourcePattern)
-
setSourceInclusionPattern
@DataBoundSetter public void setSourceInclusionPattern(String sourceInclusionPattern)
-
setSourceExclusionPattern
@DataBoundSetter public void setSourceExclusionPattern(String sourceExclusionPattern)
-
setSkipCopyOfSrcFiles
@DataBoundSetter public void setSkipCopyOfSrcFiles(boolean skipCopyOfSrcFiles)
-
setMinimumInstructionCoverage
@DataBoundSetter public void setMinimumInstructionCoverage(String minimumInstructionCoverage)
-
setMinimumBranchCoverage
@DataBoundSetter public void setMinimumBranchCoverage(String minimumBranchCoverage)
-
setMinimumComplexityCoverage
@DataBoundSetter public void setMinimumComplexityCoverage(String minimumComplexityCoverage)
-
setMinimumLineCoverage
@DataBoundSetter public void setMinimumLineCoverage(String minimumLineCoverage)
-
setMinimumMethodCoverage
@DataBoundSetter public void setMinimumMethodCoverage(String minimumMethodCoverage)
-
setMinimumClassCoverage
@DataBoundSetter public void setMinimumClassCoverage(String minimumClassCoverage)
-
setMaximumInstructionCoverage
@DataBoundSetter public void setMaximumInstructionCoverage(String maximumInstructionCoverage)
-
setMaximumBranchCoverage
@DataBoundSetter public void setMaximumBranchCoverage(String maximumBranchCoverage)
-
setMaximumComplexityCoverage
@DataBoundSetter public void setMaximumComplexityCoverage(String maximumComplexityCoverage)
-
setMaximumLineCoverage
@DataBoundSetter public void setMaximumLineCoverage(String maximumLineCoverage)
-
setMaximumMethodCoverage
@DataBoundSetter public void setMaximumMethodCoverage(String maximumMethodCoverage)
-
setMaximumClassCoverage
@DataBoundSetter public void setMaximumClassCoverage(String maximumClassCoverage)
-
setChangeBuildStatus
@DataBoundSetter public void setChangeBuildStatus(boolean changeBuildStatus)
-
setRunAlways
@DataBoundSetter public void setRunAlways(boolean runAlways)
-
setInclusionPattern
@DataBoundSetter public void setInclusionPattern(String inclusionPattern)
-
setExclusionPattern
@DataBoundSetter public void setExclusionPattern(String exclusionPattern)
-
setDeltaInstructionCoverage
@DataBoundSetter public void setDeltaInstructionCoverage(String deltaInstructionCoverage)
-
setDeltaBranchCoverage
@DataBoundSetter public void setDeltaBranchCoverage(String deltaBranchCoverage)
-
setDeltaComplexityCoverage
@DataBoundSetter public void setDeltaComplexityCoverage(String deltaComplexityCoverage)
-
setDeltaLineCoverage
@DataBoundSetter public void setDeltaLineCoverage(String deltaLineCoverage)
-
setDeltaMethodCoverage
@DataBoundSetter public void setDeltaMethodCoverage(String deltaMethodCoverage)
-
setDeltaClassCoverage
@DataBoundSetter public void setDeltaClassCoverage(String deltaClassCoverage)
-
setBuildOverBuild
@DataBoundSetter public void setBuildOverBuild(boolean buildOverBuild)
-
saveCoverageReports
protected static void saveCoverageReports(FilePath destFolder, FilePath sourceFolder) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
resolveFilePaths
protected String resolveFilePaths(Run<?,?> build, TaskListener listener, String input, Map<String,String> env) throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
resolveFilePaths
protected String resolveFilePaths(AbstractBuild<?,?> build, TaskListener listener, String input) throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
resolveDirPaths
protected static FilePath[] resolveDirPaths(FilePath workspace, TaskListener listener, String input) throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
perform
public void perform(@NonNull Run<?,?> run, @NonNull FilePath filePath, @NonNull EnvVars env, @NonNull Launcher launcher, @NonNull TaskListener taskListener) throws InterruptedException, IOException
- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
-
checkResult
public static Result checkResult(JacocoBuildAction action)
-
checkBuildOverBuildResult
public Result checkBuildOverBuildResult(Run<?,?> run, PrintStream logger)
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
- Specified by:
getRequiredMonitorService
in interfaceBuildStep
-
-