Class GroovyCondition
- java.lang.Object
-
- hudson.plugins.promoted_builds.PromotionCondition
-
- hudson.plugins.promoted_builds.conditions.GroovyCondition
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<PromotionCondition>
public class GroovyCondition extends PromotionCondition
Allow specification of Groovy scripts to qualify builds. Script evaluation is done using the Script Security plugin
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
GroovyCondition.Badge
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description GroovyCondition(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript script, String unmetQualificationLabel, String metQualificationLabel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDisplayLabel()
String
getMetQualificationLabel()
org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript
getScript()
String
getUnmetQualificationLabel()
PromotionBadge
isMet(PromotionProcess promotionProcess, AbstractBuild<?,?> build)
Checks if the promotion criteria is met.-
Methods inherited from class hudson.plugins.promoted_builds.PromotionCondition
all, getApplicableTriggers, getDescriptor, isMet
-
-
-
-
Method Detail
-
getScript
public org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript getScript()
-
getUnmetQualificationLabel
public String getUnmetQualificationLabel()
-
getMetQualificationLabel
public String getMetQualificationLabel()
-
getDisplayLabel
public String getDisplayLabel()
-
isMet
public PromotionBadge isMet(PromotionProcess promotionProcess, AbstractBuild<?,?> build)
Description copied from class:PromotionCondition
Checks if the promotion criteria is met.- Overrides:
isMet
in classPromotionCondition
- 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.
-
-