Class ManualCondition
java.lang.Object
hudson.plugins.promoted_builds.PromotionCondition
hudson.plugins.promoted_builds.conditions.ManualCondition
- All Implemented Interfaces:
ExtensionPoint,Describable<PromotionCondition>
- Direct Known Subclasses:
JobDslManualCondition
PromotionCondition that requires manual promotion.- Author:
- Kohsuke Kawaguchi, Peter Hayes
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classstatic final classNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapprove(AbstractBuild<?, ?> build, PromotionProcess promotionProcess) approve(AbstractBuild<?, ?> build, PromotionProcess promotionProcess, List<ParameterValue> paramValues) booleancanApprove(PromotionProcess promotionProcess, AbstractBuild<?, ?> build) Verifies that the currently logged in user (or anonymous) has permission to approve the promotion and that the promotion has not already been approved.voiddoApprove(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, PromotionProcess promotionProcess, AbstractBuild<?, ?> build) Web method to handle the approval action submitted by the user.getParameterDefinition(String name) Gets theParameterDefinitionof the given name, if any.getUsers()booleanbooleanisMet(PromotionProcess promotionProcess, AbstractBuild<?, ?> build) Checks if the promotion criteria is met.voidMethods inherited from class hudson.plugins.promoted_builds.PromotionCondition
all, getApplicableTriggers, getDescriptor, isMet
-
Field Details
-
MISSING_USER_ID_DISPLAY_STRING
- See Also:
-
-
Constructor Details
-
ManualCondition
public ManualCondition()
-
-
Method Details
-
getUsers
-
setUsers
-
getParameterDefinitions
-
getParameterDefinition
Gets theParameterDefinitionof the given name, if any. -
getUsersAsSet
-
isMet
Description copied from class:PromotionConditionChecks if the promotion criteria is met.- Overrides:
isMetin 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.
-
canApprove
Verifies that the currently logged in user (or anonymous) has permission to approve the promotion and that the promotion has not already been approved. -
isInUsersList
public boolean isInUsersList() -
isInGroupList
public boolean isInGroupList() -
approve
@CheckForNull public Future<Promotion> approve(AbstractBuild<?, ?> build, PromotionProcess promotionProcess, List<ParameterValue> paramValues) throws IOException- Throws:
IOException
-
createDefaultValues
-
approve
public Future<Promotion> approve(AbstractBuild<?, ?> build, PromotionProcess promotionProcess) throws IOException- Throws:
IOException
-
doApprove
@POST public void doApprove(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, @AncestorInPath PromotionProcess promotionProcess, @AncestorInPath AbstractBuild<?, ?> build) throws IOException, jakarta.servlet.ServletExceptionWeb method to handle the approval action submitted by the user.- Throws:
IOExceptionjakarta.servlet.ServletException
-