Re: How do I persist changes to the model made via a Groovy script to disk?
+1 having both tried the javadoc and ide path in the past, I recommend by far the ide. Discovering code and possibilities through javadoc solely proves terribly cumbersome. Cheers Le 17 mars 2014 00:11, Richard Lavoie lavoie.rich...@gmail.com a écrit : The IDE is the best way because of the inter class easy navigation and the fact that source code is often submitted along with binaries in macen. You could also just look at the javadocs but I don't think it's published online. It is available through maven though. Going from the source with IDE is the easiest path. Richard Lavoie On 2014-03-16, at 16:42, Christian Goetze christian.goe...@appdynamics.com wrote: 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 christian.goe...@appdynamics.com wrote: Thank you - that appears to work. On Sun, Mar 16, 2014 at 1:37 PM, Richard Lavoie lavoie.rich...@gmail.com wrote: Have you tried hudson.model.Hudson.instance.save() ? On Sun, Mar 16, 2014 at 4:07 PM, Christian Goetze christian.goe...@appdynamics.com 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How do I persist changes to the model made via a Groovy script to disk?
On 17.03.2014, at 00:50, Richard Lavoie lavoie.rich...@gmail.com wrote: But do we have for LTS or previous versions ? Everything introduced later is (or should be) annotated with @since, see e.g. http://javadoc.jenkins-ci.org/hudson/model/AbstractItem.html#getRelativeDisplayNameFrom%28hudson.model.ItemGroup%29 http://javadoc.jenkins-ci.org/jenkins/model/Jenkins.html#createProjectFromXML(java.lang.String,%20java.io.InputStream) http://javadoc.jenkins-ci.org/jenkins/security/SecurityListener.html -- 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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
How do I persist changes to the model made via a Groovy script to disk?
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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How do I persist changes to the model made via a Groovy script to disk?
Have you tried hudson.model.Hudson.instance.save() ? On Sun, Mar 16, 2014 at 4:07 PM, Christian Goetze christian.goe...@appdynamics.com 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 the Google Groups Jenkins Users group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How do I persist changes to the model made via a Groovy script to disk?
Thank you - that appears to work. On Sun, Mar 16, 2014 at 1:37 PM, Richard Lavoie lavoie.rich...@gmail.comwrote: Have you tried hudson.model.Hudson.instance.save() ? On Sun, Mar 16, 2014 at 4:07 PM, Christian Goetze christian.goe...@appdynamics.com 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How do I persist changes to the model made via a Groovy script to disk?
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 christian.goe...@appdynamics.com wrote: Thank you - that appears to work. On Sun, Mar 16, 2014 at 1:37 PM, Richard Lavoie lavoie.rich...@gmail.comwrote: Have you tried hudson.model.Hudson.instance.save() ? On Sun, Mar 16, 2014 at 4:07 PM, Christian Goetze christian.goe...@appdynamics.com 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How do I persist changes to the model made via a Groovy script to disk?
The IDE is the best way because of the inter class easy navigation and the fact that source code is often submitted along with binaries in macen. You could also just look at the javadocs but I don't think it's published online. It is available through maven though. Going from the source with IDE is the easiest path. Richard Lavoie On 2014-03-16, at 16:42, Christian Goetze christian.goe...@appdynamics.com wrote: 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 christian.goe...@appdynamics.com wrote: Thank you - that appears to work. On Sun, Mar 16, 2014 at 1:37 PM, Richard Lavoie lavoie.rich...@gmail.com wrote: Have you tried hudson.model.Hudson.instance.save() ? On Sun, Mar 16, 2014 at 4:07 PM, Christian Goetze christian.goe...@appdynamics.com 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How do I persist changes to the model made via a Groovy script to disk?
Its available online @ http://javadoc.jenkins-ci.org/ Richard. On Mon, Mar 17, 2014 at 12:11 PM, Richard Lavoie lavoie.rich...@gmail.comwrote: The IDE is the best way because of the inter class easy navigation and the fact that source code is often submitted along with binaries in macen. You could also just look at the javadocs but I don't think it's published online. It is available through maven though. Going from the source with IDE is the easiest path. Richard Lavoie On 2014-03-16, at 16:42, Christian Goetze christian.goe...@appdynamics.com wrote: 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 christian.goe...@appdynamics.com wrote: Thank you - that appears to work. On Sun, Mar 16, 2014 at 1:37 PM, Richard Lavoie lavoie.rich...@gmail.com wrote: Have you tried hudson.model.Hudson.instance.save() ? On Sun, Mar 16, 2014 at 4:07 PM, Christian Goetze christian.goe...@appdynamics.com 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: How do I persist changes to the model made via a Groovy script to disk?
Sweet, But do we have for LTS or previous versions ? Richard Lavoie On 2014-03-16, at 19:22, Richard Bywater rich...@byh2o.com wrote: Its available online @ http://javadoc.jenkins-ci.org/ Richard. On Mon, Mar 17, 2014 at 12:11 PM, Richard Lavoie lavoie.rich...@gmail.com wrote: The IDE is the best way because of the inter class easy navigation and the fact that source code is often submitted along with binaries in macen. You could also just look at the javadocs but I don't think it's published online. It is available through maven though. Going from the source with IDE is the easiest path. Richard Lavoie On 2014-03-16, at 16:42, Christian Goetze christian.goe...@appdynamics.com wrote: 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 christian.goe...@appdynamics.com wrote: Thank you - that appears to work. On Sun, Mar 16, 2014 at 1:37 PM, Richard Lavoie lavoie.rich...@gmail.com wrote: Have you tried hudson.model.Hudson.instance.save() ? On Sun, Mar 16, 2014 at 4:07 PM, Christian Goetze christian.goe...@appdynamics.com 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. 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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.