java - Jenkins groovy script - running processes on nodes returns no result -
i'm trying run command on each slave node in jenkins.. array? cloud? whatever. anyway, here's relevant code:
if (node.tocomputer().online && nodeisvagranthost) { def output = new java.io.bytearrayoutputstream(); def stream = new streamtasklistener(output); def nodelauncher = node.createlauncher(stream) def starter = new launcher.procstarter(); starter.commands = ['vagrant', 'global-status'] def proc = nodelauncher.launch(starter); proc.join(); stream.getlogger().println("test , that"); println(proc.isalive()); print(output); } it looks command runs, can't results of command. note i've tried things ["ls", "-lah"] , such - things should "work" - , result same.
here prints out me in console:
false $ vagrant global-status test , i know i've got missing simple here, i'm not groovy/java guy that's used streams getting directed on place ^_^
Comments
Post a Comment