Klasse RecordIssuesStep
java.lang.Object
hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.steps.Step>
org.jenkinsci.plugins.workflow.steps.Step
io.jenkins.plugins.analysis.core.steps.RecordIssuesStep
- Alle implementierten Schnittstellen:
ExtensionPoint
,Describable<org.jenkinsci.plugins.workflow.steps.Step>
,Serializable
public class RecordIssuesStep
extends org.jenkinsci.plugins.workflow.steps.Step
implements Serializable
Pipeline step that scans report files or the console log for issues. Stores the created issues in an
AnalysisResult
. The result is attached to the Run
by registering a ResultAction
.
Additional features:
- It provides a
QualityGateEvaluator
that is checked after each run. If the quality gate is not passed, then the build will be set toResult.UNSTABLE
orResult.FAILURE
, depending on the configuration properties. - It provides thresholds for the build health that could be adjusted in the configuration screen.
These values are used by the
HealthReportBuilder
to compute the health and the health trend graph.
- Siehe auch:
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungstatic class
Descriptor for this step: defines the context and the UI labels.Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
addQualityGate
(int size, QualityGate.QualityGateType type, QualityGate.QualityGateResult result) Appends the specified quality gates to the end of the list of quality gates.boolean
Returns whether the results for each configured static analysis result should be aggregated into a single result or if every tool should get an individual result.boolean
Veraltet.boolean
Returns whether recording should be enabled for failed builds as well.int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
boolean
boolean
Veraltet.Forensics will be automatically skipped if the Forensics recorder is not activated.int
getId()
boolean
boolean
getName()
Returns the reference build id of the reference job to get the results for the issue difference computation.Returns the reference job to get the results for the issue difference computation.getScm()
List
<io.jenkins.plugins.prism.SourceCodeDirectory> getTool()
Always returnsnull
.Veraltet.this method is only intended to be called by the UIgetTools()
Returns the static analysis tools that will scan files and create issues.int
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
int
Veraltet.replaced bygetQualityGates()
boolean
Returns whether all issues should be published using the Checks API.boolean
isQuiet()
Returns whether report logging output should be enabled.boolean
Returns whether SCM blaming should be disabled.boolean
Returns whether publishing checks should be skipped.void
setAggregatingResults
(boolean aggregatingResults) void
setBlameDisabled
(boolean blameDisabled) Veraltet.void
setEnabledForFailure
(boolean enabledForFailure) void
setFailedNewAll
(int size) Veraltet.void
setFailedNewHigh
(int size) Veraltet.void
setFailedNewLow
(int size) Veraltet.void
setFailedNewNormal
(int size) Veraltet.void
setFailedTotalAll
(int size) Veraltet.void
setFailedTotalHigh
(int size) Veraltet.void
setFailedTotalLow
(int size) Veraltet.void
setFailedTotalNormal
(int size) Veraltet.void
setFailOnError
(boolean failOnError) Determines whether to fail the step on errors during the step of recording issues.void
setFilters
(List<RegexpFilter> filters) void
setForensicsDisabled
(boolean forensicsDisabled) Veraltet.Forensics will be automatically skipped if the Forensics recorder is not activated.void
setHealthy
(int healthy) Sets the healthy threshold, i.e.void
Defines the ID of the results.void
setIgnoreFailedBuilds
(boolean ignoreFailedBuilds) Iftrue
, then only successful or unstable reference builds will be considered.void
setIgnoreQualityGate
(boolean ignoreQualityGate) Iftrue
, then the result of the quality gate is ignored when selecting a reference build.void
setMinimumSeverity
(String minimumSeverity) Sets the minimum severity to consider when computing the health report.void
Defines the name of the results.void
setPublishAllIssues
(boolean publishAllIssues) void
setQualityGates
(List<QualityGate> qualityGates) Defines the optional list of quality gates.void
setQuiet
(boolean quiet) void
setReferenceBuildId
(String referenceBuildId) Sets the reference build id of the reference job for the issue difference computation.void
setReferenceJobName
(String referenceJobName) Sets the reference job to get the results for the issue difference computation.void
Sets the SCM that should be used to find the reference build for.void
setSkipBlames
(boolean skipBlames) void
setSkipPublishingChecks
(boolean skipPublishingChecks) void
setSourceCodeEncoding
(String sourceCodeEncoding) Sets the encoding to use to read source files.void
setSourceDirectories
(List<io.jenkins.plugins.prism.SourceCodeDirectory> sourceDirectories) Sets the paths to the directories that contain the source code.void
setSourceDirectory
(String sourceDirectory) Sets the path to the folder that contains the source code.void
Sets the static analysis tool that will scan files and create issues.void
setToolProxies
(List<ToolProxy> toolProxies) Veraltet.this method is only intended to be called by the UIvoid
Sets the static analysis tools that will scan files and create issues.void
Sets the static analysis tools that will scan files and create issues.void
setTrendChartType
(TrendChartType trendChartType) Sets the type of the trend chart that should be shown on the job page.void
setUnhealthy
(int unhealthy) Sets the healthy threshold, i.e.void
setUnstableNewAll
(int size) Veraltet.void
setUnstableNewHigh
(int size) Veraltet.void
setUnstableNewLow
(int size) Veraltet.void
setUnstableNewNormal
(int size) Veraltet.void
setUnstableTotalAll
(int size) Veraltet.void
setUnstableTotalHigh
(int size) Veraltet.void
setUnstableTotalLow
(int size) Veraltet.void
setUnstableTotalNormal
(int size) Veraltet.org.jenkinsci.plugins.workflow.steps.StepExecution
start
(org.jenkinsci.plugins.workflow.steps.StepContext context) Von Klasse geerbte Methoden org.jenkinsci.plugins.workflow.steps.Step
getDescriptor
-
Konstruktordetails
-
RecordIssuesStep
@DataBoundConstructor public RecordIssuesStep()Creates a new instance ofRecordIssuesStep
.
-
-
Methodendetails
-
setScm
Sets the SCM that should be used to find the reference build for. The reference recorder will select the SCM based on a substring comparison, there is no need to specify the full name.- Parameter:
scm
- the ID of the SCM to use (a substring of the full ID)
-
getScm
-
setQualityGates
Defines the optional list of quality gates.- Parameter:
qualityGates
- the quality gates
-
addQualityGate
public void addQualityGate(int size, QualityGate.QualityGateType type, QualityGate.QualityGateResult result) Appends the specified quality gates to the end of the list of quality gates.- Parameter:
size
- the minimum number of issues that fails the quality gatetype
- the type of the quality gateresult
- determines whether the quality gate is a warning or failure
-
getQualityGates
-
setUnstableTotalAll
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getUnstableTotalAll
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setUnstableTotalHigh
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getUnstableTotalHigh
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setUnstableNewAll
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getUnstableNewAll
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setUnstableTotalNormal
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getUnstableTotalNormal
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setUnstableTotalLow
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getUnstableTotalLow
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setUnstableNewHigh
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getUnstableNewHigh
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setUnstableNewNormal
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getUnstableNewNormal
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setUnstableNewLow
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getUnstableNewLow
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setFailedTotalAll
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getFailedTotalAll
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setFailedTotalHigh
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getFailedTotalHigh
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setFailedTotalNormal
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getFailedTotalNormal
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setFailedTotalLow
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getFailedTotalLow
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setFailedNewAll
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getFailedNewAll
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setFailedNewHigh
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getFailedNewHigh
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setFailedNewNormal
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getFailedNewNormal
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setFailedNewLow
Veraltet.Sets the quality gate.- Parameter:
size
- number of issues
-
getFailedNewLow
Veraltet.replaced bygetQualityGates()
Gets the quality gate.- Gibt zurück:
- 0
-
setId
Defines the ID of the results. The ID is used as URL of the results and as name in UI elements. If no ID is given, then the ID of the associated result object is used.Note: this property is not used if
isAggregatingResults
isfalse
. It is also not visible in the UI in order to simplify the user interface.- Parameter:
id
- the ID of the results
-
getId
-
setName
Defines the name of the results. The name is used for all labels in the UI. If no name is given, then the name of the associatedStaticAnalysisLabelProvider
is used.Note: this property is not used if
isAggregatingResults
isfalse
. It is also not visible in the UI in order to simplify the user interface.- Parameter:
name
- the name of the results
-
getName
-
getToolProxies
Veraltet.this method is only intended to be called by the UIGets the static analysis tools that will scan files and create issues.- Gibt zurück:
- the static analysis tools (wrapped as
ToolProxy
) - Siehe auch:
-
setToolProxies
Veraltet.this method is only intended to be called by the UISets the static analysis tools that will scan files and create issues.- Parameter:
toolProxies
- the static analysis tools (wrapped asToolProxy
)- Siehe auch:
-
setTools
Sets the static analysis tools that will scan files and create issues.- Parameter:
tools
- the static analysis tools- Siehe auch:
-
setTools
Sets the static analysis tools that will scan files and create issues.- Parameter:
tool
- the static analysis tooladditionalTools
- additional static analysis tools (might be empty)- Siehe auch:
-
getTools
Returns the static analysis tools that will scan files and create issues.- Gibt zurück:
- the static analysis tools
-
setTool
Sets the static analysis tool that will scan files and create issues.- Parameter:
tool
- the static analysis tool
-
getTool
Always returnsnull
. Note: this method is required for Jenkins data binding.- Gibt zurück:
null
-
getSourceCodeEncoding
-
setSourceCodeEncoding
Sets the encoding to use to read source files.- Parameter:
sourceCodeEncoding
- the encoding, e.g. "ISO-8859-1"
-
getSourceDirectory
-
setSourceDirectory
Sets the path to the folder that contains the source code. If not relative and thus not part of the workspace then this folder needs to be added in Jenkins global configuration.- Parameter:
sourceDirectory
- a folder containing the source code
-
setSourceDirectories
@DataBoundSetter public void setSourceDirectories(List<io.jenkins.plugins.prism.SourceCodeDirectory> sourceDirectories) Sets the paths to the directories that contain the source code. If not relative and thus not part of the workspace then these directories need to be added in Jenkins global configuration to prevent accessing of forbidden resources.- Parameter:
sourceDirectories
- directories containing the source code
-
getSourceDirectories
-
getAggregatingResults
public boolean getAggregatingResults()Returns whether the results for each configured static analysis result should be aggregated into a single result or if every tool should get an individual result.- Gibt zurück:
true
if the results of each static analysis tool should be aggregated into a single result,false
if every tool should get an individual result.
-
setAggregatingResults
@DataBoundSetter public void setAggregatingResults(boolean aggregatingResults) -
isQuiet
public boolean isQuiet()Returns whether report logging output should be enabled.- Gibt zurück:
true
if report logging is disabledfalse
if report logging is enabled
-
setQuiet
@DataBoundSetter public void setQuiet(boolean quiet) -
getBlameDisabled
Veraltet.useisSkipBlames()
Returns whether SCM blaming should be disabled.- Gibt zurück:
true
if SCM blaming should be disabled
-
setBlameDisabled
Veraltet.Determines whether to skip the SCM blaming.- Parameter:
blameDisabled
-true
if SCM blaming should be disabled
-
isSkipBlames
public boolean isSkipBlames()Returns whether SCM blaming should be disabled.- Gibt zurück:
true
if SCM blaming should be disabled
-
setSkipBlames
@DataBoundSetter public void setSkipBlames(boolean skipBlames) -
getForensicsDisabled
Veraltet.Forensics will be automatically skipped if the Forensics recorder is not activated.Not used anymore.- Gibt zurück:
true
if SCM forensics should be disabled
-
setForensicsDisabled
Veraltet.Forensics will be automatically skipped if the Forensics recorder is not activated.Not used anymore.- Parameter:
forensicsDisabled
- not used
-
isSkipPublishingChecks
public boolean isSkipPublishingChecks()Returns whether publishing checks should be skipped.- Gibt zurück:
true
if publishing checks should be skipped,false
otherwise
-
setSkipPublishingChecks
@DataBoundSetter public void setSkipPublishingChecks(boolean skipPublishingChecks) -
isPublishAllIssues
public boolean isPublishAllIssues()Returns whether all issues should be published using the Checks API. If set tofalse
only new issues will be published.- Gibt zurück:
true
if all issues should be published,false
if only new issues should be published
-
setPublishAllIssues
@DataBoundSetter public void setPublishAllIssues(boolean publishAllIssues) -
getEnabledForFailure
public boolean getEnabledForFailure()Returns whether recording should be enabled for failed builds as well.- Gibt zurück:
true
if recording should be enabled for failed builds as well,false
if recording is enabled for successful or unstable builds only
-
setEnabledForFailure
@DataBoundSetter public void setEnabledForFailure(boolean enabledForFailure) -
setIgnoreQualityGate
@DataBoundSetter public void setIgnoreQualityGate(boolean ignoreQualityGate) Iftrue
, then the result of the quality gate is ignored when selecting a reference build. This option is disabled by default so a failing quality gate will be passed from build to build until the original reason for the failure has been resolved.- Parameter:
ignoreQualityGate
- iftrue
then the result of the quality gate is ignored, otherwise only build with a successful quality gate are selected
-
getIgnoreQualityGate
public boolean getIgnoreQualityGate() -
setIgnoreFailedBuilds
@DataBoundSetter public void setIgnoreFailedBuilds(boolean ignoreFailedBuilds) Iftrue
, then only successful or unstable reference builds will be considered. This option is enabled by default, since analysis results might be inaccurate if the build failed. Iffalse
, every build that contains a static analysis result is considered, even if the build failed.- Parameter:
ignoreFailedBuilds
- iftrue
then a stable build is used as reference
-
getIgnoreFailedBuilds
public boolean getIgnoreFailedBuilds() -
setFailOnError
@DataBoundSetter public void setFailOnError(boolean failOnError) Determines whether to fail the step on errors during the step of recording issues.- Parameter:
failOnError
- iftrue
then the build will be failed on errors,false
then errors are only reported in the UI
-
getFailOnError
public boolean getFailOnError() -
setReferenceJobName
Sets the reference job to get the results for the issue difference computation.- Parameter:
referenceJobName
- the name of reference job
-
getReferenceJobName
Returns the reference job to get the results for the issue difference computation. If the job is not defined, thenIssuesRecorder.NO_REFERENCE_DEFINED
is returned.- Gibt zurück:
- the name of reference job, or
IssuesRecorder.NO_REFERENCE_DEFINED
if undefined
-
setReferenceBuildId
Sets the reference build id of the reference job for the issue difference computation.- Parameter:
referenceBuildId
- the build id of the reference job
-
getReferenceBuildId
Returns the reference build id of the reference job to get the results for the issue difference computation. If the build id is not defined, thenIssuesRecorder.NO_REFERENCE_DEFINED
is returned.- Gibt zurück:
- the reference build id, or
IssuesRecorder.NO_REFERENCE_DEFINED
if undefined
-
getHealthy
public int getHealthy() -
setHealthy
@DataBoundSetter public void setHealthy(int healthy) Sets the healthy threshold, i.e. the number of issues when health is reported as 100%.- Parameter:
healthy
- the number of issues when health is reported as 100%
-
getUnhealthy
public int getUnhealthy() -
setUnhealthy
@DataBoundSetter public void setUnhealthy(int unhealthy) Sets the healthy threshold, i.e. the number of issues when health is reported as 0%.- Parameter:
unhealthy
- the number of issues when health is reported as 0%
-
getMinimumSeverity
-
setMinimumSeverity
Sets the minimum severity to consider when computing the health report. Issues with a severity less than this value will be ignored.- Parameter:
minimumSeverity
- the severity to consider
-
setTrendChartType
Sets the type of the trend chart that should be shown on the job page.- Parameter:
trendChartType
- the type of the trend chart to use
-
getTrendChartType
-
getFilters
-
setFilters
-
start
public org.jenkinsci.plugins.workflow.steps.StepExecution start(org.jenkinsci.plugins.workflow.steps.StepContext context) - Angegeben von:
start
in Klasseorg.jenkinsci.plugins.workflow.steps.Step
-
isSkipBlames()