Class PublicBuildStatusAction

java.lang.Object
org.jenkinsci.plugins.badge.actions.PublicBuildStatusAction
All Implemented Interfaces:
ExtensionPoint, Action, ModelObject, RootAction, UnprotectedRootAction

@Extension public class PublicBuildStatusAction extends Object implements UnprotectedRootAction
Exposes the build status badge via unprotected URL.

Even though the URL is unprotected, the user does still need the 'ViewStatus' permission on the given Job. If you want the status icons to be public readable/accessible, just grant the 'ViewStatus' permission globally to 'anonymous'.

  • Field Details

    • VIEW_STATUS

      public static final Permission VIEW_STATUS
  • Constructor Details

  • Method Details

    • getUrlName

      public String getUrlName()
      Specified by:
      getUrlName in interface Action
    • getIconFileName

      public String getIconFileName()
      Specified by:
      getIconFileName in interface Action
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface Action
      Specified by:
      getDisplayName in interface ModelObject
    • doIcon

      @WebMethod(name="icon") public org.kohsuke.stapler.HttpResponse doIcon(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, @QueryParameter String job, @QueryParameter String build, @QueryParameter String style, @QueryParameter String subject, @QueryParameter String status, @QueryParameter String color, @QueryParameter String animatedOverlayColor, @QueryParameter String config, @QueryParameter String link)
    • doIconDotSvg

      @WebMethod(name="icon.svg") public org.kohsuke.stapler.HttpResponse doIconDotSvg(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, @QueryParameter String job, @QueryParameter String build, @QueryParameter String style, @QueryParameter String subject, @QueryParameter String status, @QueryParameter String color, @QueryParameter String animatedOverlayColor, @QueryParameter String config, @QueryParameter String link)
    • doText

      public String doText(org.kohsuke.stapler.StaplerRequest2 req, org.kohsuke.stapler.StaplerResponse2 rsp, @QueryParameter String job, @QueryParameter String build)
    • getRun

      public static Run<?,?> getRun(Job<?,?> project, String build, Boolean throwErrorWhenNotFound)