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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Result.OptionHandlerImpl
-
Field Summary
Fields Modifier and Type Field Description static Result
ABORTED
The build was manually aborted.BallColor
color
Default ball color for this status.boolean
completeBuild
Is this a complete build - i.e.static com.thoughtworks.xstream.converters.SingleValueConverter
conv
static Result
FAILURE
The build had a fatal error.static Result
NOT_BUILT
The module was not built.int
ordinal
Bigger numbers are worse.static Result
SUCCESS
The build had no errors.static Result
UNSTABLE
The build had some errors but they were not fatal.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Result
combine(Result that)
Combines twoResult
s and returns the worse one.static Result
combine(Result r1, Result r2)
Combines twoResult
s and returns the worse one.static Result
fromString(String s)
static void
init()
boolean
isBetterOrEqualTo(Result that)
boolean
isBetterThan(Result that)
boolean
isCompleteBuild()
Is this a complete build - i.e.boolean
isWorseOrEqualTo(Result that)
boolean
isWorseThan(Result that)
String
toExportedObject()
String
toString()
-
-
-
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.
-
ABORTED
@NonNull public static final Result ABORTED
The build was manually aborted. If you are catchingInterruptedException
and interpreting it asABORTED
, you should checkExecutor.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 Detail
-
combine
@NonNull public Result combine(@NonNull Result that)
Combines twoResult
s and returns the worse one.
-
combine
public static Result combine(Result r1, Result r2)
Combines twoResult
s and returns the worse one.This method is null-safe (any
Result
is "worse" thannull
, andnull
is returned if both parameters arenull
).- Parameters:
r1
- a result (may benull
)r2
- a result (may benull
)- 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 interfaceorg.kohsuke.stapler.export.CustomExportedBean
-
init
@Initializer public static void init()
-
-