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.

Sample Groovy scripts

Some scripts at JBoss.org

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.
  1. Jun 24, 2011

    Avenir Voronov says:

    I have an issue to change emails in publisher.recipients. I modified script 'dis...

    I have an issue to change emails in publisher.recipients. I modified script 'display mail notification recipients' strings 'println ... publisher' to 'publisher.recipients=name@example.com' and added some conditional constructs to filter necesary jobs.

    But recipients values were changed only in instance. I tried to save it by hadson.model.Hudson.instance.save()

    But Reloading the configuration from disk from Mange hudson returned old values for publisher.recipients.

    How could I change recipients in jobs and save configuration to disk?

    1. Jul 04, 2011

      Avenir Voronov says:

      Issue solved. hadson.model.Hudson.instance.save() Is not right way. I should sav...

      Issue solved.
      hadson.model.Hudson.instance.save()
      Is not right way.
      I should save every item after changing by:
      item.save()

      it also commits into scm.