Package hudson.plugins.promoted_builds
Class PromotionCondition
- java.lang.Object
-
- hudson.plugins.promoted_builds.PromotionCondition
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<PromotionCondition>
- Direct Known Subclasses:
DownstreamPassCondition
,GroovyCondition
,ManualCondition
,ReleasePromotionCondition
,SelfPromotionCondition
,UpstreamPromotionCondition
public abstract class PromotionCondition extends Object implements ExtensionPoint, Describable<PromotionCondition>
Extension point for defining a promotion criteria.- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description PromotionCondition()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static DescriptorExtensionList<PromotionCondition,PromotionConditionDescriptor>
all()
Returns all the registeredPromotionConditionDescriptor
s.static List<PromotionConditionDescriptor>
getApplicableTriggers(AbstractProject<?,?> p)
Returns a subset ofPromotionConditionDescriptor
s that applys to the given project.PromotionConditionDescriptor
getDescriptor()
PromotionBadge
isMet(AbstractBuild<?,?> build)
Deprecated.PromotionBadge
isMet(PromotionProcess promotionProcess, AbstractBuild<?,?> build)
Checks if the promotion criteria is met.
-
-
-
Method Detail
-
isMet
@CheckForNull public PromotionBadge isMet(AbstractBuild<?,?> build)
Deprecated.Checks if the promotion criteria is met.- Parameters:
build
- The build for which the promotion is considered.- Returns:
- non-null if the promotion condition is met. This object is then recorded so that we know how a build was promoted. Null if otherwise, meaning it shouldn't be promoted.
-
isMet
public PromotionBadge isMet(PromotionProcess promotionProcess, AbstractBuild<?,?> build)
Checks if the promotion criteria is met.- Parameters:
promotionProcess
- The promotion process being evaluated for qualificationbuild
- The build for which the promotion is considered.- Returns:
- non-null if the promotion condition is met. This object is then recorded so that we know how a build was promoted. Null if otherwise, meaning it shouldn't be promoted.
-
getDescriptor
public PromotionConditionDescriptor getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<PromotionCondition>
-
all
public static DescriptorExtensionList<PromotionCondition,PromotionConditionDescriptor> all()
Returns all the registeredPromotionConditionDescriptor
s.
-
getApplicableTriggers
public static List<PromotionConditionDescriptor> getApplicableTriggers(AbstractProject<?,?> p)
Returns a subset ofPromotionConditionDescriptor
s that applys to the given project.
-
-