What is the best way to discover all these nice things one could do...? Do I really need to fire up an IDE and explore the source?
On Sun, Mar 16, 2014 at 1:41 PM, Christian Goetze < [email protected]> wrote: > Thank you - that appears to work. > > > On Sun, Mar 16, 2014 at 1:37 PM, Richard Lavoie > <[email protected]>wrote: > >> Have you tried hudson.model.Hudson.instance.save() ? >> >> >> On Sun, Mar 16, 2014 at 4:07 PM, Christian Goetze < >> [email protected]> wrote: >> >>> I recently learned that I can use the script console to run groovy >>> scripts to modify items in the model. >>> >>> Specifically, I would like to add, change and remove slave node labels >>> via a script. >>> >>> I can make a script like this for example: >>> >>> hudson.model.Hudson.instance.slaves.each { slave -> >>> out.print("Slave $slave.nodeName : Labels: $slave.labelString") >>> slave.setLabelString(slave.labelString + " " + "operational") >>> out.println(" --> New labels: $slave.labelString")} >>> >>> Now how do I persist this change to disk? >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Jenkins Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Richard Lavoie >> IT consultant / consultant en informatique >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Jenkins Users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/jenkinsci-users/epL30VXvXC4/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
