I need to perform multiple executions of an external process within the same Bamboo task. I've written plugins using code similar to the below. If I want to execute multiple external processes, is there a way to combine the results that each process returns? Does anyone know of any plugins that currently do anything similar to this?
public TaskResult execute(final TaskContext taskContext) throws TaskException {
TaskResultBuilder builder = TaskResultBuilder.create(taskContext);
ExternalProcess process = processService.createProcess(taskContext,
new ExternalProcessBuilder()
.command(Arrays.asList("/bin/ls"))
.workingDirectory(taskContext.getWorkingDirectory()));
process.execute();
// TODO -- need to execute second process
// TODO -- need to check the results of both processes
return builder.checkReturnCode(process, 0).build();
}