Package jenkins.model

Interface HistoricalBuild

All Superinterfaces:
ModelObject
All Known Implementing Classes:
AbstractBuild, Build, FreeStyleBuild, Run

@Restricted(org.kohsuke.accmod.restrictions.Beta.class) public interface HistoricalBuild extends ModelObject
A Run-like object as it might be displayed by BuildHistoryWidget.
Since:
2.477
  • Method Details

    • getNumber

      int getNumber()
      Returns:
      A build number
    • getUrl

      @NonNull String getUrl()
      Returns the URL of this HistoricalBuild, relative to the context root of Jenkins.
      Returns:
      String like "job/foo/32/" with trailing slash but no leading slash.
    • getDescription

      @CheckForNull String getDescription()
      Returns a human-readable description which is used on the main build page.

      It can also be quite long, and it may use markup in a format defined by a MarkupFormatter. getTruncatedDescription() may be used to retrieve a size-limited description, but it implies some limitations.

      Returns:
      the build description.
    • getFullDisplayName

      @NonNull String getFullDisplayName()
      Returns:
      a human-readable full display name of this build.
    • getQueueId

      long getQueueId()
      Get the Queue.Item.getId() of the original queue item from where this HistoricalBuild instance originated.
      Returns:
      The queue item ID.
    • getResult

      @CheckForNull Result getResult()
      Returns the build result.

      When a build is in progress, this method returns an intermediate result.

      Returns:
      The status of the build, if it has completed or some build step has set a status; may be null if the build is ongoing.
    • getParameterValues

      @NonNull List<ParameterValue> getParameterValues()
      See Also:
    • isBuilding

      boolean isBuilding()
      Returns true if the build is not completed yet. This includes "not started yet" state.
    • getIconColor

      @NonNull BallColor getIconColor()
      Gets the icon color for display.
    • getBuildStatusIconClassName

      @NonNull default String getBuildStatusIconClassName()
    • getBuildStatusUrl

      @NonNull default String getBuildStatusUrl()
    • getTimestamp

      @NonNull Calendar getTimestamp()
      When the build is scheduled.
    • getDurationString

      @NonNull String getDurationString()
      Gets the string that says how long the build took to run.
    • getBadgeActions

      @NonNull List<BuildBadgeAction> getBadgeActions()
      Gets the list of BuildBadgeActions applicable to this instance.
    • getTruncatedDescription

      @CheckForNull default String getTruncatedDescription()
      Returns the length-limited description. The method tries to take HTML tags within the description into account, but it is a best-effort attempt. Also, the method will likely not work properly if a non-HTML MarkupFormatter is used.
      Returns:
      The length-limited description.