Class GroovyLabelAssignmentProperty
java.lang.Object
hudson.model.JobProperty<AbstractProject<?,?>>
jp.ikedam.jenkins.plugins.groovy_label_assignment.GroovyLabelAssignmentProperty
- All Implemented Interfaces:
ExtensionPoint,Describable<JobProperty<?>>,ReconfigurableDescribable<JobProperty<?>>,BuildStep
JobProperty that holds configuration for GroovyLabelAssignment.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classClass used for working with view.Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherListNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringProperty name used for job configuration page.Fields inherited from class hudson.model.JobProperty
ownerFields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS -
Constructor Summary
ConstructorsConstructorDescriptionGroovyLabelAssignmentProperty(String groovyScript) GroovyLabelAssignmentProperty(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript secureGroovyScript) Constructor from the form input. -
Method Summary
Modifier and TypeMethodDescriptionbooleanassignLabel(AbstractProject<?, ?> project, List<Action> actions) Decide label of nodes where the job will run.protected groovy.lang.BindingcreateBinding(AbstractProject<?, ?> project, List<Action> actions) Create variables used in a groovy script.Deprecated.org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScriptMethods inherited from class hudson.model.JobProperty
getDescriptor, getJobAction, getJobActions, getJobOverrides, getProjectAction, getProjectActions, getRequiredMonitorService, getSubTasks, perform, prebuild, reconfigure, reconfigure, setOwner
-
Field Details
-
PROPERTYNAME
Property name used for job configuration page.- See Also:
-
-
Constructor Details
-
GroovyLabelAssignmentProperty
@DataBoundConstructor public GroovyLabelAssignmentProperty(org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript secureGroovyScript) Constructor from the form input.- Parameters:
secureGroovyScript-- Since:
- 1.2.0
-
GroovyLabelAssignmentProperty
-
-
Method Details
-
getGroovyScript
Deprecated.usegetSecureGroovyScript()instead- Returns:
- the Groovy Script
-
getSecureGroovyScript
public org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript getSecureGroovyScript()- Returns:
- Since:
- 1.2.0
-
assignLabel
Decide label of nodes where the job will run.- Parameters:
project- The job. This may not be the owner job if it is MatrixConfiguration.actions- actions of job. and add LabelAssignmentAction.- Returns:
- returns properly evaluate script and add label.
-
createBinding
@SuppressRestrictedWarnings(org.kohsuke.accmod.restrictions.ProtectedExternally.class) protected groovy.lang.Binding createBinding(AbstractProject<?, ?> project, List<Action> actions) Create variables used in a groovy script.- Parameters:
project-actions-- Returns:
-
getSecureGroovyScript()instead