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

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

      • 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 Detail

      • 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
      • toExportedObject

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

        @NonNull
        public static Result fromString​(@NonNull
                                        String s)