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
-
Constructor Summary
ConstructorDescriptionPromotedBuildAction
(AbstractBuild<?, ?> owner) PromotedBuildAction
(AbstractBuild<?, ?> owner, Status firstStatus) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Called when the build is qualified.boolean
Deprecated.boolean
canPromote
(String processName) boolean
contains
(PromotionProcess process) Checks if the given criterion is already promoted.boolean
Checks if the given criterion is already promoted.org.kohsuke.stapler.HttpResponse
doForcePromotion
(String name) Force a promotion.getDynamic
(String name, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) BindsStatus
to URL hierarchy by its name.AbstractBuild<?,
?> getOwner()
Gets the owning build.Gets list ofPromotionProcess
s that are not yet attained.AbstractProject<?,
?> Gets the owning project.getPromotion
(String name) Finds theStatus
that has matchingStatus.name
value.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 ofPromotionProcess
s 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
null
if the promotion cannot be found
-
getIconFileName
- Specified by:
getIconFileName
in interfaceAction
-
getDisplayName
- Specified by:
getDisplayName
in interfaceAction
- Specified by:
getDisplayName
in interfaceModelObject
-
getUrlName
- Specified by:
getUrlName
in interfaceAction
-
getDynamic
public Status getDynamic(String name, org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) BindsStatus
to 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.