public enum CounterKey extends Enum<CounterKey>
Every time a phase ends:
We can use these new variables at job condition, so we can write now conditions as follows (of course, these new variables are available in the next phase):
Enum Constant and Description |
---|
ABORTED
The name of the new build variable which stores the number of aborted jobs.
|
FAILED
The name of the new build variable which stores the number of failed jobs.
|
SKIPPED
The name of the new build variable which stores the number of skipped jobs.
|
STABLE
The name of the new build variable which stores the number of successful jobs.
|
SUCCESSFUL
The name of the new build variable which stores the number of successful jobs.
|
UNSTABLE
The name of the new build variable which stores the number of unstable jobs.
|
Modifier and Type | Field and Description |
---|---|
static String[] |
KEYS
A convenient static array of all multijob and phase keys.
|
Modifier and Type | Method and Description |
---|---|
abstract boolean |
appliesTo(hudson.model.Result result)
Checks if a result applies to the CounterKey.
|
String |
getMultiJobKey()
Returns the name of the key associated with the multijob project and the counterKey.
|
String |
getPhaseKey()
Returns the name of the key associated with the phase and the counterKey.
|
static CounterKey |
safetyValueOf(String key)
A convenient way to encapsulate logic to avoid an IllegalArgumentException when
we need to find a CounterKey value and the key doesn't exists.
|
static CounterKey |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CounterKey[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CounterKey SUCCESSFUL
public static final CounterKey STABLE
public static final CounterKey UNSTABLE
public static final CounterKey FAILED
public static final CounterKey ABORTED
public static final CounterKey SKIPPED
public static final String[] KEYS
public static CounterKey[] values()
for (CounterKey c : CounterKey.values()) System.out.println(c);
public static CounterKey valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic abstract boolean appliesTo(hudson.model.Result result)
result
- the Result
of the job that we checked if applies to the CounterKey.true
when the result applies to the counterKey,
false
if not applies.Result
public String getMultiJobKey()
public String getPhaseKey()
public static CounterKey safetyValueOf(String key)
key
- the name of the CounterKey that we want to search.CounterKey
or null
if it doesn't exists.Copyright © 2016–2020. All rights reserved.