Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Using Hudson/Hudson script console"

Line 1: Line 1:
 
This article is a stub. It will be expanded as content is migrated from the [http://wiki.hudson-ci.org/display/HUDSON/Use+Hudson|Use Hudson-CI]Web site.  
 
This article is a stub. It will be expanded as content is migrated from the [http://wiki.hudson-ci.org/display/HUDSON/Use+Hudson|Use Hudson-CI]Web site.  
  
<br>
 
  
== Hudson Script Console ==
+
== Hudson Script Console ==
  
Hudson features a nice Groovy script console which allows to run arbitrary scripts on the Hudson server or on slave nodes. This feature can be accessed from the "manage Hudson" link, typically at your http://server/hudson/script.<br>Sample Groovy scripts
+
Hudson features a nice Groovy script console which allows to run arbitrary scripts on the Hudson server or on slave nodes. This feature can be accessed from the "manage Hudson" link, typically at your http://server/hudson/script.<br>
  
[http://wiki.hudson-ci.org/display/HUDSON/Allow+broken+build+claiming+on+every+jobs Allow broken build claiming on every jobs]<br> [http://wiki.hudson-ci.org/display/HUDSON/Change+JVM+Options+in+all+Maven+tasks+of+Freestyle+Jobs Change JVM Options in all Maven tasks of Freestyle Jobs] — This script find all Maven Tasks registered in freestyle jobs and replace JVM Options by a new value.<br> [http://wiki.hudson-ci.org/display/HUDSON/Change+SCMTrigger+for+each+project+to+disable+during+the+night+and+the+week-end Change SCMTrigger] for each project to disable during the night and the week-end — This script lets you easily change all jobs running every minutes so that it gets disabled between 21:00 and 07:00 and on Saturday and Sunday.<br> [http://wiki.hudson-ci.org/display/HUDSON/Convert+standard+mail+notifications+to+use+the+Mail-Ext+Publisher+plugin Convert standard mail notifications to use the Mail-Ext Publisher plugin] — This script replace mail notifications in all projects by Mail-Ext publisher plugin and re-uses existing recipients.<br> [http://wiki.hudson-ci.org/display/HUDSON/Disable+all+jobs Disable all jobs] — This script disable all jobs in you hudson server<br> [http://wiki.hudson-ci.org/display/HUDSON/Display+job+parameters Display job parameters] — This scripts displays the parameters for all the jobs along with their default values (if applicable).<br> [http://wiki.hudson-ci.org/display/HUDSON/Display+mail+notifications+recipients Display mail notifications recipients] — This script displays for all jobs the list of mail recipients used for notifications.<br> [http://wiki.hudson-ci.org/display/HUDSON/Display+monitors+status Display monitors status] — Hudson uses monitors to validate various behaviors. If you dismiss one, Hudson will never propose you to reactivate it. This script allows you to check the status of all monitors and to reactive them.<br> [http://wiki.hudson-ci.org/display/HUDSON/Display+timer+triggers Display timer triggers] — This scripts displays the timer triggers for all the jobs in order to better arrange them.<br> [http://wiki.hudson-ci.org/display/HUDSON/Failed+Jobs Failed Jobs] — This scripts displays a list of all failed jobs. Addon: restart them.
+
== Sample Groovy scripts ==
  
[http://community.jboss.org/wiki/HudsonHowToDebug Some scripts at JBoss.org]<br>
+
[[Allow broken build claiming on every jobs|Allow broken build claiming on every jobs]]
 +
Change JVM Options in all Maven tasks of Freestyle Jobs — This script find all Maven Tasks registered in freestyle jobs and replace JVM Options by a new value.
 +
Change SCMTrigger for each project to disable during the night and the week-end — This script lets you easily change all jobs running every minutes so that it gets disabled between 21:00 and 07:00 and on Saturday and Sunday.
 +
Convert standard mail notifications to use the Mail-Ext Publisher plugin — This script replace mail notifications in all projects by Mail-Ext publisher plugin and re-uses existing recipients.
 +
Disable all jobs — This script disable all jobs in you hudson server
 +
Display job parameters — This scripts displays the parameters for all the jobs along with their default values (if applicable).
 +
Display mail notifications recipients — This script displays for all jobs the list of mail recipients used for notifications.
 +
Display monitors status — Hudson uses monitors to validate various behaviors. If you dismiss one, Hudson will never propose you to reactivate it. This script allows you to check the status of all monitors and to reactive them.
 +
Display timer triggers — This scripts displays the timer triggers for all the jobs in order to better arrange them.
 +
Failed Jobs — This scripts displays a list of all failed jobs. Addon: restart them.

Revision as of 21:04, 10 December 2012

This article is a stub. It will be expanded as content is migrated from the Hudson-CIWeb site.


Hudson Script Console

Hudson features a nice Groovy script console which allows to run arbitrary scripts on the Hudson server or on slave nodes. This feature can be accessed from the "manage Hudson" link, typically at your http://server/hudson/script.

Sample Groovy scripts

Allow broken build claiming on every jobs Change JVM Options in all Maven tasks of Freestyle Jobs — This script find all Maven Tasks registered in freestyle jobs and replace JVM Options by a new value. Change SCMTrigger for each project to disable during the night and the week-end — This script lets you easily change all jobs running every minutes so that it gets disabled between 21:00 and 07:00 and on Saturday and Sunday. Convert standard mail notifications to use the Mail-Ext Publisher plugin — This script replace mail notifications in all projects by Mail-Ext publisher plugin and re-uses existing recipients. Disable all jobs — This script disable all jobs in you hudson server Display job parameters — This scripts displays the parameters for all the jobs along with their default values (if applicable). Display mail notifications recipients — This script displays for all jobs the list of mail recipients used for notifications. Display monitors status — Hudson uses monitors to validate various behaviors. If you dismiss one, Hudson will never propose you to reactivate it. This script allows you to check the status of all monitors and to reactive them. Display timer triggers — This scripts displays the timer triggers for all the jobs in order to better arrange them. Failed Jobs — This scripts displays a list of all failed jobs. Addon: restart them.

Back to the top