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:
  • Constructor Details

    • QualityGate

      protected QualityGate(double threshold)
      Creates a new instance of QualityGate.
      Parameters:
      threshold - minimum or maximum value that triggers this quality gate
  • Method Details

    • setCriticality

      @DataBoundSetter public final void setCriticality(QualityGate.QualityGateCriticality criticality)
      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

      public abstract String getName()
      Returns a human-readable name of the quality gate.
      Returns:
      a human-readable name
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getThreshold

      public final double getThreshold()
    • getCriticality

      public final QualityGate.QualityGateCriticality getCriticality()
    • getStatus

      public final QualityGateStatus getStatus()