Search in sources :

Example 1 with LabeledOutputStreamConsumer

use of com.thoughtworks.go.util.command.LabeledOutputStreamConsumer in project gocd by gocd.

the class TfsExecutor method execute.

@Override
public boolean execute(BuildCommand command, BuildSession buildSession) {
    String url = command.getStringArg("url");
    String username = command.getStringArg("username");
    String password = command.getStringArg("password");
    String domain = command.getStringArg("domain");
    String projectPath = command.getStringArg("projectPath");
    String revision = command.getStringArg("revision");
    File workingDir = buildSession.resolveRelativeDir(command.getWorkingDirectory());
    ConsoleOutputStreamConsumer consoleOutputStreamConsumer = new LabeledOutputStreamConsumer(TaggedStreamConsumer.PREP, TaggedStreamConsumer.PREP_ERR, buildSession.processOutputStreamConsumer());
    RevisionContext revisionContext = new RevisionContext(new StringRevision(revision));
    AgentSubprocessExecutionContext execCtx = new AgentSubprocessExecutionContext(buildSession.getAgentIdentifier(), workingDir.getAbsolutePath());
    createMaterial(url, username, password, domain, projectPath).updateTo(consoleOutputStreamConsumer, workingDir, revisionContext, execCtx);
    return true;
}
Also used : LabeledOutputStreamConsumer(com.thoughtworks.go.util.command.LabeledOutputStreamConsumer) RevisionContext(com.thoughtworks.go.domain.materials.RevisionContext) StringRevision(com.thoughtworks.go.domain.materials.mercurial.StringRevision) ConsoleOutputStreamConsumer(com.thoughtworks.go.util.command.ConsoleOutputStreamConsumer) File(java.io.File) AgentSubprocessExecutionContext(com.thoughtworks.go.domain.materials.AgentSubprocessExecutionContext)

Aggregations

AgentSubprocessExecutionContext (com.thoughtworks.go.domain.materials.AgentSubprocessExecutionContext)1 RevisionContext (com.thoughtworks.go.domain.materials.RevisionContext)1 StringRevision (com.thoughtworks.go.domain.materials.mercurial.StringRevision)1 ConsoleOutputStreamConsumer (com.thoughtworks.go.util.command.ConsoleOutputStreamConsumer)1 LabeledOutputStreamConsumer (com.thoughtworks.go.util.command.LabeledOutputStreamConsumer)1 File (java.io.File)1