getLabelString is erroring out with a datatype error.
Whenever I try to run the following command:
def list_labels = objnode.getLabelString().split(’ ') as List
from within my groovy script it errors out with the following error:
groovy.lang.MissingMethodException: No signature of method: hudson.model.Hudson$MasterComputer.getLabelString() is applicable for argument types: () values:
what is wrong here?
To obtain your Jenkins version and an exhaustive list of plugins and their versions, paste the code snippet located at Issue Reporting into your script console, and post the output below under “Jenkins setup”:
→
Jenkins setup:
Isn’t getLabelString() a function that should give you all the labels corresponding to a particular node in jenkins and setLabelString() is something to set more labels to the node. Somehow whenever I use getLabelString on a particular node it does not yield any of the labels that a node currently has. Is there something that I am doing wrong here?