Package hudson.model

Class Result

java.lang.Object
hudson.model.Result
All Implemented Interfaces:
Serializable, org.kohsuke.stapler.export.CustomExportedBean

public final class Result extends Object implements Serializable, org.kohsuke.stapler.export.CustomExportedBean
The build outcome.
Author:
Kohsuke Kawaguchi
See Also:
  • Field Details

    • SUCCESS

      @NonNull public static final Result SUCCESS
      The build had no errors.
    • UNSTABLE

      @NonNull public static final Result UNSTABLE
      The build had some errors but they were not fatal. For example, some tests failed.
    • FAILURE

      @NonNull public static final Result FAILURE
      The build had a fatal error.
    • NOT_BUILT

      @NonNull public static final Result NOT_BUILT
      The module was not built.

      This status code is used in a multi-stage build (like maven2) where a problem in earlier stage prevented later stages from building.

    • ABORTED

      @NonNull public static final Result ABORTED
      The build was manually aborted. If you are catching InterruptedException and interpreting it as ABORTED, you should check Executor.abortResult() instead (starting 1.417.)
    • ordinal

      public final int ordinal
      Bigger numbers are worse.
    • color

      @NonNull public final BallColor color
      Default ball color for this status.
    • completeBuild

      public final boolean completeBuild
      Is this a complete build - i.e. did it run to the end (not aborted)?
      Since:
      1.526
    • conv

      public static final com.thoughtworks.xstream.converters.SingleValueConverter conv
  • Method Details

    • combine

      @NonNull public Result combine(@NonNull Result that)
      Combines two Results and returns the worse one.
    • combine

      public static Result combine(Result r1, Result r2)
      Combines two Results and returns the worse one.

      This method is null-safe (any Result is "worse" than null, and null is returned if both parameters are null).

      Parameters:
      r1 - a result (may be null)
      r2 - a result (may be null)
      Returns:
      the worst result (may be null)
      Since:
      2.257
    • isWorseThan

      public boolean isWorseThan(@NonNull Result that)
    • isWorseOrEqualTo

      public boolean isWorseOrEqualTo(@NonNull Result that)
    • isBetterThan

      public boolean isBetterThan(@NonNull Result that)
    • isBetterOrEqualTo

      public boolean isBetterOrEqualTo(@NonNull Result that)
    • isCompleteBuild

      public boolean isCompleteBuild()
      Is this a complete build - i.e. did it run to the end (not aborted)?
      Since:
      1.526
    • toString

      @NonNull public String toString()
      Overrides:
      toString in class Object
    • toExportedObject

      @NonNull public String toExportedObject()
      Specified by:
      toExportedObject in interface org.kohsuke.stapler.export.CustomExportedBean
    • fromString

      @NonNull public static Result fromString(@NonNull String s)
    • init

      @Initializer public static void init()