Class LabelParameterValue
- java.lang.Object
-
- hudson.model.ParameterValue
-
- org.jvnet.jenkins.plugins.nodelabelparameter.LabelParameterValue
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
NodeParameterValue
public class LabelParameterValue extends ParameterValue
- Author:
- Dominik Bartholdi (imod)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected List<String>
nextLabels
-
Fields inherited from class hudson.model.ParameterValue
name
-
-
Constructor Summary
Constructors Constructor Description LabelParameterValue(String name)
LabelParameterValue(String name, String label)
Deprecated.LabelParameterValue(String name, String label, boolean allNodesMatchingLabel, NodeEligibility nodeEligibility)
LabelParameterValue(String name, String description, String label)
LabelParameterValue(String name, List<String> labels, NodeEligibility nodeEligibility)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addBadgeToBuild(AbstractBuild<?,?> build)
adds a badge to the build which will be visible in the build history as an iconvoid
buildEnvironment(Run<?,?> build, EnvVars env)
Exposes the name/value as an environment variable.BuildWrapper
createBuildWrapper(AbstractBuild<?,?> build)
VariableResolver<String>
createVariableResolver(AbstractBuild<?,?> build)
boolean
equals(Object o)
Label
getAssignedLabel(SubTask task)
String
getLabel()
List<String>
getNextLabels()
Gets the labels to be used to trigger the next builds withint
hashCode()
void
setLabel(String label)
String
toString()
-
Methods inherited from class hudson.model.ParameterValue
buildEnvVars, buildEnvVars, getDefinition, getDescription, getFormattedDescription, getName, getShortDescription, getValue, isSensitive, setDescription
-
-
-
-
Constructor Detail
-
LabelParameterValue
public LabelParameterValue(String name)
-
LabelParameterValue
@Deprecated public LabelParameterValue(String name, String label)
Deprecated.
-
LabelParameterValue
public LabelParameterValue(String name, List<String> labels, NodeEligibility nodeEligibility)
-
LabelParameterValue
@DataBoundConstructor public LabelParameterValue(String name, String label, boolean allNodesMatchingLabel, NodeEligibility nodeEligibility)
- Parameters:
name
- parameter valuelabel
- parameter labelallNodesMatchingLabel
- if true, then all nodes matching the label are to be usednodeEligibility
- node eligibility definition
-
-
Method Detail
-
getNextLabels
public List<String> getNextLabels()
Gets the labels to be used to trigger the next builds with- Returns:
- the labels
-
buildEnvironment
public void buildEnvironment(Run<?,?> build, EnvVars env)
Exposes the name/value as an environment variable.- Overrides:
buildEnvironment
in classParameterValue
-
getAssignedLabel
public Label getAssignedLabel(SubTask task)
- Overrides:
getAssignedLabel
in classParameterValue
-
createVariableResolver
public VariableResolver<String> createVariableResolver(AbstractBuild<?,?> build)
- Overrides:
createVariableResolver
in classParameterValue
-
getLabel
@Exported(name="value") public String getLabel()
- Returns:
- the label
-
setLabel
public void setLabel(String label)
- Parameters:
label
- the label to set
-
createBuildWrapper
public BuildWrapper createBuildWrapper(AbstractBuild<?,?> build)
- Overrides:
createBuildWrapper
in classParameterValue
- See Also:
ParameterValue.createBuildWrapper(hudson.model.AbstractBuild)
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classParameterValue
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classParameterValue
-
addBadgeToBuild
protected void addBadgeToBuild(AbstractBuild<?,?> build)
adds a badge to the build which will be visible in the build history as an icon- Parameters:
build
- the build to add the badge to
-
-