Package hudson.plugins.promoted_builds
Class PromotedBuildAction
java.lang.Object
hudson.plugins.promoted_builds.PromotedBuildAction
- All Implemented Interfaces:
Action,BuildBadgeAction,ModelObject
Action for AbstractBuild indicating that it's promoted.- Author:
- Kohsuke Kawaguchi
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPromotedBuildAction(AbstractBuild<?, ?> owner) PromotedBuildAction(AbstractBuild<?, ?> owner, Status firstStatus) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCalled when the build is qualified.booleanDeprecated.booleancanPromote(String processName) booleancontains(PromotionProcess process) Checks if the given criterion is already promoted.booleanChecks if the given criterion is already promoted.org.kohsuke.stapler.HttpResponsedoForcePromotion(String name) Force a promotion.getDynamic(String name, org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) BindsStatusto URL hierarchy by its name.AbstractBuild<?,?> getOwner()Gets the owning build.Gets list ofPromotionProcesss that are not yet attained.AbstractProject<?,?> Gets the owning project.getPromotion(String name) Finds theStatusthat has matchingStatus.namevalue.getPromotionBuilds(PromotionProcess promotionProcess) Gets the read-only view of all the promotion builds that this build achieved for a PromotionProcess.getPromotionProcess(String name) Get the specified promotion process by name.Gets the read-only view of all the promotions that this build achieved.boolean
-
Field Details
-
owner
-
-
Constructor Details
-
PromotedBuildAction
-
PromotedBuildAction
-
-
Method Details
-
getOwner
Gets the owning build. -
getProject
Gets the owning project. -
contains
Checks if the given criterion is already promoted. -
contains
Checks if the given criterion is already promoted. -
add
Called when the build is qualified.- Throws:
IOException
-
getPromotions
Gets the read-only view of all the promotions that this build achieved. -
getPromotionBuilds
Gets the read-only view of all the promotion builds that this build achieved for a PromotionProcess. -
getPromotion
-
hasPromotion
public boolean hasPromotion() -
canPromote
@Deprecated @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) @RestrictedSince("3.0") public boolean canPromote()Deprecated.For internal code usecanPromote(String)with the name of the process that will be promoted instead. -
canPromote
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public boolean canPromote(String processName) -
getPendingPromotions
Gets list ofPromotionProcesss that are not yet attained.- Returns:
- can be empty but never null.
-
getPromotionProcess
Get the specified promotion process by name.- Returns:
- The discovered process of
nullif the promotion cannot be found
-
getIconFileName
- Specified by:
getIconFileNamein interfaceAction
-
getDisplayName
- Specified by:
getDisplayNamein interfaceAction- Specified by:
getDisplayNamein interfaceModelObject
-
getUrlName
- Specified by:
getUrlNamein interfaceAction
-
getDynamic
public Status getDynamic(String name, org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp) BindsStatusto URL hierarchy by its name. -
doForcePromotion
public org.kohsuke.stapler.HttpResponse doForcePromotion(@QueryParameter("name") String name) throws IOException Force a promotion.- Throws:
IOException
-
canPromote(String)with the name of the process that will be promoted instead.