Package hudson.model

Class 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.
    Kohsuke Kawaguchi
    See Also:
    Serialized Form
    • Field Detail

      • SUCCESS

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

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

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

        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.

      • ordinal

        public final int ordinal
        Bigger numbers are worse.
      • color

        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)?
      • conv

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

      • combine

        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).

        r1 - a result (may be null)
        r2 - a result (may be null)
        the worst result (may be null)
      • 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)?
      • toExportedObject

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

        public static Result fromString​(@NonNull
                                        String s)