vendita cialis in svizzera viagra einzeln kaufen proscar 5 mg prezzo costo cialis generico cialis dove si compra dapoxetin bestellen köpa viagra i stockholm viagra apotek prix cialis le vrai pas le générique kaufen viagra viagra preis preiswert cialis viagra per nachnahme bestellen viagra tabletten teilen comprar viagra na net
cialis donne viagra site francais cialis viagra levitra differenze acquista cialis on line acheter viagra france cialis sito sicuro viagra generica online viagra korvattavuus precio viagra 50 cialis 20mg prix viagra x le donne comprar viagra em portugal levitra indien achat viagra belgique levitra venta libre

Groovy for Hudson console

Hudson continuous integration server has a console which is good for testing scripts and access to commands that your Hudson jobs need.

The hudson console only let’s you run Groovy script. To run commands on the machine, Groovy has the method

“string”.execute()

. So now I can use this snippet to test versions of Ruby, JRuby, etc:

def commands = ["ruby --version", "gem environment", "which ruby", "which gem", "jruby --version"] commands.each{ run(it) } def run(cmd) { //def proc = commands[1].execute() def proc = cmd.execute() proc.waitFor() // Obtain status and output println "return code: ${ proc.exitValue()}" println "stderr: ${proc.err.text}" println "stdout: ${proc.in.text}" // *out* from the external program is *in* for groovy }

Example borrowed from and shrinkwrapped from groovy.codehaus.org/JN1015-Collections

Comments are closed.