Klasse CoverageBuildAction
java.lang.Object
io.jenkins.plugins.util.BuildAction<edu.hm.hafner.coverage.Node>
io.jenkins.plugins.coverage.metrics.steps.CoverageBuildAction
- Alle implementierten Schnittstellen:
Action
,ModelObject
,Serializable
,RunAction2
,SimpleBuildStep.LastBuildAction
,org.kohsuke.stapler.StaplerProxy
public final class CoverageBuildAction
extends io.jenkins.plugins.util.BuildAction<edu.hm.hafner.coverage.Node>
implements org.kohsuke.stapler.StaplerProxy
Controls the life cycle of the coverage results in a job. This action persists the results of a build and displays a
summary on the build page. The actual visualization of the results is defined in the matching
summary.jelly
file. This action also provides access to the coverage details: these are rendered using a new view instance.- Autor:
- Ullrich Hafner
- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungCoverageBuildAction
(Run<?, ?> owner, String id, String optionalName, String icon, edu.hm.hafner.coverage.Node result, io.jenkins.plugins.util.QualityGateResult qualityGateResult, edu.hm.hafner.util.FilteredLog log) Creates a new instance ofCoverageBuildAction
.CoverageBuildAction
(Run<?, ?> owner, String id, String optionalName, String icon, edu.hm.hafner.coverage.Node result, io.jenkins.plugins.util.QualityGateResult qualityGateResult, edu.hm.hafner.util.FilteredLog log, String referenceBuildId, NavigableMap<edu.hm.hafner.coverage.Metric, org.apache.commons.lang3.math.Fraction> delta, List<? extends edu.hm.hafner.coverage.Value> modifiedLinesCoverage, NavigableMap<edu.hm.hafner.coverage.Metric, org.apache.commons.lang3.math.Fraction> modifiedLinesCoverageDifference, List<? extends edu.hm.hafner.coverage.Value> modifiedFilesCoverage, NavigableMap<edu.hm.hafner.coverage.Metric, org.apache.commons.lang3.math.Fraction> modifiedFilesCoverageDifference, List<? extends edu.hm.hafner.coverage.Value> indirectCoverageChanges) Creates a new instance ofCoverageBuildAction
. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected io.jenkins.plugins.util.JobAction
<? extends io.jenkins.plugins.util.BuildAction<edu.hm.hafner.coverage.Node>> protected io.jenkins.plugins.util.AbstractXmlStream
<edu.hm.hafner.coverage.Node> formatDelta
(Baseline baseline, edu.hm.hafner.coverage.Metric metric) Returns a formatted and localized String representation of the delta for the specified metric (with respect to the given baseline).formatValue
(Baseline baseline, edu.hm.hafner.coverage.Metric metric) Returns a formatted and localized String representation of the value for the specified metric (with respect to the given baseline).NavigableMap
<edu.hm.hafner.coverage.Metric, org.apache.commons.lang3.math.Fraction> getAllDeltas
(Baseline baseline) Returns all available deltas for the specified baseline.List
<edu.hm.hafner.coverage.Value> getAllValues
(Baseline baseline) Returns all available values for the specified baseline.Returns the supported baselines.protected String
Optional
<org.apache.commons.lang3.math.Fraction> Returns whether a delta metric for the specified metric exists.getDeltaBaseline
(Baseline baseline) Returns the associate delta baseline for the specified baseline.edu.hm.hafner.util.FilteredLog
getLog()
io.jenkins.plugins.util.QualityGateResult
Returns the possible reference build that has been used to compute the coverage delta.Renders the reference build as an HTML link.Returns the title text for the specified baseline.double
Returns whether the trend of the values for the specific metric is positive or negative.Optional
<edu.hm.hafner.coverage.Value> getValueForMetric
(Baseline baseline, edu.hm.hafner.coverage.Metric metric) Returns the value for the specified metric, if available.List
<edu.hm.hafner.coverage.Value> Returns all important values for the specified baseline.boolean
hasBaselineResult
(Baseline baseline) Returns whether a delta metric for the specified metric exists.boolean
Returns whether a delta metric for the specified baseline exists.boolean
Returns whether a delta metric for the specified metric exists.boolean
Returns whether a value for the specified metric exists.protected Object
toString()
Von Klasse geerbte Methoden io.jenkins.plugins.util.BuildAction
getBuildActionFromHistoryStartingFrom, getOwner, getProjectActions, getResult, onAttached, onLoad
-
Konstruktordetails
-
CoverageBuildAction
public CoverageBuildAction(Run<?, ?> owner, String id, String optionalName, String icon, edu.hm.hafner.coverage.Node result, io.jenkins.plugins.util.QualityGateResult qualityGateResult, edu.hm.hafner.util.FilteredLog log) Creates a new instance ofCoverageBuildAction
.- Parameter:
owner
- the associated build that created the statisticsid
- ID (URL) of the resultsoptionalName
- optional name that overrides the default name of the resultsicon
- name of the icon that should be used in actions and viewsresult
- the coverage tree as a result to persist with this actionqualityGateResult
- status of the quality gateslog
- the logging statements of the recording step
-
-
Methodendetails
-
readResolve
- Setzt außer Kraft:
readResolve
in Klasseio.jenkins.plugins.util.BuildAction<edu.hm.hafner.coverage.Node>
-
getLog
public edu.hm.hafner.util.FilteredLog getLog() -
getQualityGateResult
public io.jenkins.plugins.util.QualityGateResult getQualityGateResult() -
getFormatter
-
getStatistics
-
getBaselines
-
hasBaselineResult
Returns whether a delta metric for the specified metric exists.- Parameter:
baseline
- the baseline to use- Gibt zurück:
true
if a delta is available for the specified metric,false
otherwise
-
getDeltaBaseline
Returns the associate delta baseline for the specified baseline.- Parameter:
baseline
- the baseline to get the delta baseline for- Gibt zurück:
- the delta baseline
- Löst aus:
NoSuchElementException
- if this baseline does not provide a delta baseline
-
getTitle
-
getAllValues
Returns all available values for the specified baseline.- Parameter:
baseline
- the baseline to get the values for- Gibt zurück:
- the available values
- Löst aus:
NoSuchElementException
- if this baseline does not provide values
-
getAllDeltas
public NavigableMap<edu.hm.hafner.coverage.Metric,org.apache.commons.lang3.math.Fraction> getAllDeltas(Baseline baseline) Returns all available deltas for the specified baseline.- Parameter:
baseline
- the baseline to get the deltas for- Gibt zurück:
- the available values
- Löst aus:
NoSuchElementException
- if this baseline does not provide deltas
-
getValues
Returns all important values for the specified baseline.- Parameter:
baseline
- the baseline to get the values for- Gibt zurück:
- the available values
- Löst aus:
NoSuchElementException
- if this baseline does not provide values
-
getValueForMetric
public Optional<edu.hm.hafner.coverage.Value> getValueForMetric(Baseline baseline, edu.hm.hafner.coverage.Metric metric) Returns the value for the specified metric, if available.- Parameter:
baseline
- the baseline to get the value formetric
- the metric to get the value for- Gibt zurück:
- the optional value
-
hasDelta
Returns whether a delta metric for the specified baseline exists.- Parameter:
baseline
- the baseline to use- Gibt zurück:
true
if a delta is available for the specified baseline,false
otherwise
-
hasDelta
Returns whether a delta metric for the specified metric exists.- Parameter:
baseline
- the baseline to usemetric
- the metric to check- Gibt zurück:
true
if a delta is available for the specified metric,false
otherwise
-
getDelta
public Optional<org.apache.commons.lang3.math.Fraction> getDelta(Baseline baseline, edu.hm.hafner.coverage.Metric metric) Returns whether a delta metric for the specified metric exists.- Parameter:
baseline
- the baseline to usemetric
- the metric to check- Gibt zurück:
true
if a delta is available for the specified metric,false
otherwise
-
hasValue
Returns whether a value for the specified metric exists.- Parameter:
baseline
- the baseline to usemetric
- the metric to check- Gibt zurück:
true
if a value is available for the specified metric,false
otherwise
-
formatValue
Returns a formatted and localized String representation of the value for the specified metric (with respect to the given baseline).- Parameter:
baseline
- the baseline to usemetric
- the metric to get the delta for- Gibt zurück:
- the formatted value
-
formatDelta
Returns a formatted and localized String representation of the delta for the specified metric (with respect to the given baseline).- Parameter:
baseline
- the baseline to usemetric
- the metric to get the delta for- Gibt zurück:
- the delta metric
-
getTrend
Returns whether the trend of the values for the specific metric is positive or negative.- Parameter:
baseline
- the baseline to usemetric
- the metric to check- Gibt zurück:
- a positive value if the trend is positive, a negative value if the trend is negative, or
0
if there is no significant change in the trend
-
getReferenceBuild
-
getReferenceBuildLink
Renders the reference build as an HTML link.- Gibt zurück:
- the reference build
- Siehe auch:
-
createXmlStream
protected io.jenkins.plugins.util.AbstractXmlStream<edu.hm.hafner.coverage.Node> createXmlStream()- Angegeben von:
createXmlStream
in Klasseio.jenkins.plugins.util.BuildAction<edu.hm.hafner.coverage.Node>
-
createProjectAction
protected io.jenkins.plugins.util.JobAction<? extends io.jenkins.plugins.util.BuildAction<edu.hm.hafner.coverage.Node>> createProjectAction()- Angegeben von:
createProjectAction
in Klasseio.jenkins.plugins.util.BuildAction<edu.hm.hafner.coverage.Node>
-
getBuildResultBaseName
- Angegeben von:
getBuildResultBaseName
in Klasseio.jenkins.plugins.util.BuildAction<edu.hm.hafner.coverage.Node>
-
getTarget
- Angegeben von:
getTarget
in Schnittstelleorg.kohsuke.stapler.StaplerProxy
-
getIconFileName
- Angegeben von:
getIconFileName
in SchnittstelleAction
-
getDisplayName
- Angegeben von:
getDisplayName
in SchnittstelleAction
- Angegeben von:
getDisplayName
in SchnittstelleModelObject
-
getUrlName
- Angegeben von:
getUrlName
in SchnittstelleAction
-
toString
-