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

public class GroovyLabelAssignmentProperty extends JobProperty<AbstractProject<?,?>>
JobProperty that holds configuration for GroovyLabelAssignment.
  • Field Details

    • PROPERTYNAME

      public static final String 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

      public GroovyLabelAssignmentProperty(String groovyScript)
  • Method Details

    • getGroovyScript

      @Deprecated public String getGroovyScript()
      Deprecated.
      Returns:
      the Groovy Script
    • getSecureGroovyScript

      public org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript getSecureGroovyScript()
      Returns:
      Since:
      1.2.0
    • assignLabel

      public boolean assignLabel(AbstractProject<?,?> project, List<Action> actions)
      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: