Hi, A quick check on my system gives me : class hudson.model.labels.LabelAtom
With the given Groovy Script : def jenkins = hudson.model.Hudson.instance println jenkins.items[0].assignedLabel.class BR, Vincent ________________________________________ From: [email protected] [[email protected]] on behalf of Dirk Kuypers [[email protected]] Sent: Tuesday, June 05, 2012 12:48 PM To: [email protected] Subject: Setting assignedNode and canRoam of a project programmatically Hi, I am trying to set up my unit test Jobs via a groovy script and I am pretty far now. But I have some questions left because I cannot find the right example online/I am too new to the Jenkins API. And: I am not sure if this question would be better placed on jenkinssci-dev... I want to set assignedNode and the canRoam element in the resulting config.xml programmatically. At the moment I am stuck. <project> ... <assignedNode>unit-tests||master</assignedNode> <canRoam>false</canRoam> ... </project> I tried job.setAssignedLabel(new Label("unit-tests||master")) But Label is an abstract class. How could I achieve what I want to do? Thanks for help Dirk -- Never trust a short-haired guru
