Package io.jenkins.plugins.util
Class QualityGate
- All Implemented Interfaces:
Describable<QualityGate>
,Serializable
public abstract class QualityGate
extends AbstractDescribableImpl<QualityGate>
implements Serializable
Defines a quality gate based on a specific threshold of code coverage in the current build. After a build has been
finished, a set of
quality gates
will be evaluated and the overall quality gate status will be
reported in Jenkins UI.- Author:
- Johannes Walter
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Determines the Jenkins build result if the quality gate is failed.static class
Descriptor of theQualityGate
. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
QualityGate
(double threshold) Creates a new instance ofQualityGate
. -
Method Summary
Modifier and TypeMethodDescriptionabstract String
getName()
Returns a human-readable name of the quality gate.final QualityGateStatus
final double
final void
setCriticality
(QualityGate.QualityGateCriticality criticality) Sets the criticality of this quality gate.toString()
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
QualityGate
protected QualityGate(double threshold) Creates a new instance ofQualityGate
.- Parameters:
threshold
- minimum or maximum value that triggers this quality gate
-
-
Method Details
-
setCriticality
Sets the criticality of this quality gate. When a quality gate has been missed, this property determines whether the result of the associated coverage stage will be marked as unstable or failure.- Parameters:
criticality
- the criticality for this quality gate
-
getName
Returns a human-readable name of the quality gate.- Returns:
- a human-readable name
-
toString
-
getThreshold
public final double getThreshold() -
getCriticality
-
getStatus
-