Class PromotedBuildAction

    • Constructor Detail

      • PromotedBuildAction

        public PromotedBuildAction​(AbstractBuild<?,​?> owner)
      • PromotedBuildAction

        public PromotedBuildAction​(AbstractBuild<?,​?> owner,
                                   Status firstStatus)
    • Method Detail

      • getOwner

        public AbstractBuild<?,​?> getOwner()
        Gets the owning build.
      • getProject

        public AbstractProject<?,​?> getProject()
        Gets the owning project.
      • contains

        public boolean contains​(PromotionProcess process)
        Checks if the given criterion is already promoted.
      • contains

        public boolean contains​(String name)
        Checks if the given criterion is already promoted.
      • getPromotions

        @Exported
        public List<Status> getPromotions()
        Gets the read-only view of all the promotions that this build achieved.
      • getPromotionBuilds

        public List<Promotion> getPromotionBuilds​(PromotionProcess promotionProcess)
        Gets the read-only view of all the promotion builds that this build achieved for a PromotionProcess.
      • getPromotion

        @CheckForNull
        public Status getPromotion​(String name)
        Finds the Status that has matching Status.name value. Or null if not found.
      • hasPromotion

        public boolean hasPromotion()
      • canPromote

        @Deprecated
        @Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
        @RestrictedSince("3.0")
        public boolean canPromote()
        Deprecated.
        For internal code use canPromote(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)
      • getPromotionProcess

        @CheckForNull
        public PromotionProcess getPromotionProcess​(String name)
        Get the specified promotion process by name.
        Returns:
        The discovered process of null if the promotion cannot be found
      • getDynamic

        public Status getDynamic​(String name,
                                 org.kohsuke.stapler.StaplerRequest req,
                                 org.kohsuke.stapler.StaplerResponse rsp)
        Binds Status to URL hierarchy by its name.
      • doForcePromotion

        public org.kohsuke.stapler.HttpResponse doForcePromotion​(@QueryParameter("name")
                                                                 String name)
                                                          throws IOException
        Force a promotion.
        Throws:
        IOException