Class VectorCASTPublisher
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- com.vectorcast.plugins.vectorcastcoverage.VectorCASTPublisher
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
,SimpleBuildStep
public class VectorCASTPublisher extends Recorder implements SimpleBuildStep
Publisher
that captures VectorCAST coverage reports.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VectorCASTPublisher.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
-
-
Field Summary
Fields Modifier and Type Field Description static BuildStepDescriptor<Publisher>
DESCRIPTOR
VectorCASTHealthReportThresholds
healthReports
HealthReport
thresholds to apply.VectorCASTHealthReportThresholds
healthyTarget
String
includes
Relative path to the VectorCAST XML file inside the workspace.Integer
maxHistory
Rule
rule
/** Rule to be enforced.VectorCASTHealthReportThresholds
unhealthyTarget
Boolean
useCoverageHistory
Boolean
useThreshold
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description VectorCASTPublisher()
VectorCASTPublisher(String includes, Boolean useThreshold, VectorCASTHealthReportThresholds healthyTarget, VectorCASTHealthReportThresholds unhealthyTarget, Boolean useCoverageHistory, Integer maxHistory)
-
Method Summary
-
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, toString, 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
public String includes
Relative path to the VectorCAST XML file inside the workspace.
-
useThreshold
public Boolean useThreshold
-
useCoverageHistory
public Boolean useCoverageHistory
-
maxHistory
public Integer maxHistory
-
rule
public Rule rule
/** Rule to be enforced. Can be null. TODO: define a configuration mechanism.
-
healthReports
public VectorCASTHealthReportThresholds healthReports
HealthReport
thresholds to apply.
-
healthyTarget
public VectorCASTHealthReportThresholds healthyTarget
-
unhealthyTarget
public VectorCASTHealthReportThresholds unhealthyTarget
-
DESCRIPTOR
@Extension public static final BuildStepDescriptor<Publisher> DESCRIPTOR
-
-
Constructor Detail
-
VectorCASTPublisher
public VectorCASTPublisher()
-
VectorCASTPublisher
@DataBoundConstructor public VectorCASTPublisher(String includes, Boolean useThreshold, VectorCASTHealthReportThresholds healthyTarget, VectorCASTHealthReportThresholds unhealthyTarget, Boolean useCoverageHistory, Integer maxHistory)
-
-
Method Detail
-
getIncludes
@Nonnull public final String getIncludes()
-
getUseThreshold
@Nonnull public final Boolean getUseThreshold()
-
getUseCoverageHistory
@Nonnull public final Boolean getUseCoverageHistory()
-
getMaxHistory
@Nonnull public final Integer getMaxHistory()
-
getHealthReports
@Nonnull public final VectorCASTHealthReportThresholds getHealthReports()
-
getUnhealthReports
@Nonnull public final VectorCASTHealthReportThresholds getUnhealthReports()
-
getHealthyTarget
@Nonnull public final VectorCASTHealthReportThresholds getHealthyTarget()
-
setIncludes
@DataBoundSetter public final void setIncludes(String includes)
-
setUseThreshold
@DataBoundSetter public final void setUseThreshold(Boolean useThreshold)
-
setUseCoverageHistory
@DataBoundSetter public final void setUseCoverageHistory(Boolean useCoverageHistory)
-
setHealthReports
@DataBoundSetter public final void setHealthReports(VectorCASTHealthReportThresholds healthReports)
-
setHealthyTarget
@DataBoundSetter public final void setHealthyTarget(VectorCASTHealthReportThresholds healthyTarget)
-
setUnhealthyTarget
@DataBoundSetter public final void setUnhealthyTarget(VectorCASTHealthReportThresholds unhealthyTarget)
-
locateCoverageReports
protected static FilePath[] locateCoverageReports(FilePath workspace, String includes) throws IOException, InterruptedException
look for VectorCAST reports based in the configured parameter includes. 'includes' is - an Ant-style pattern - a list of files and folders separated by the characters ;:,- Parameters:
workspace
- workspaceincludes
- includes- Returns:
- filepaths loaded
- Throws:
IOException
- IO errorInterruptedException
- interrupted
-
saveCoverageReports
protected static void saveCoverageReports(FilePath folder, FilePath[] files) throws IOException, InterruptedException
save VectorCAST reports from the workspace to build folder- Parameters:
folder
- folderfiles
- files- Throws:
IOException
- for UI errorInterruptedException
- if interrupted
-
perform
public void perform(@Nonnull Run<?,?> run, @Nonnull FilePath workspace, @Nonnull Launcher launcher, @Nonnull TaskListener listener) throws InterruptedException, IOException
- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
-
performImpl
public boolean performImpl(Run<?,?> run, FilePath workspace, TaskListener listener) throws InterruptedException, IOException
- Throws:
InterruptedException
IOException
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
- Specified by:
getRequiredMonitorService
in interfaceBuildStep
-
getDescriptor
public BuildStepDescriptor<Publisher> getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Publisher>
- Overrides:
getDescriptor
in classRecorder
-
-