Search in sources :

Example 1 with SimpleProgramCommandLine

use of jetbrains.buildServer.agent.runner.SimpleProgramCommandLine in project teamcity-powershell by JetBrains.

the class PowerShellServiceUnix method executeWithWrapper.

private SimpleProgramCommandLine executeWithWrapper(@NotNull final Map<String, String> env, @NotNull final String workDir, @NotNull final String argsList) throws RunBuildException {
    final File scriptFile = generateNixScriptFile(argsList);
    final BuildProgressLogger buildLogger = getBuild().getBuildLogger();
    buildLogger.message("Wrapper script: " + scriptFile);
    buildLogger.message("Command: " + argsList);
    enableExecution(scriptFile);
    return new SimpleProgramCommandLine(env, workDir, scriptFile.getAbsolutePath(), Collections.<String>emptyList());
}
Also used : BuildProgressLogger(jetbrains.buildServer.agent.BuildProgressLogger) File(java.io.File) SimpleProgramCommandLine(jetbrains.buildServer.agent.runner.SimpleProgramCommandLine)

Example 2 with SimpleProgramCommandLine

use of jetbrains.buildServer.agent.runner.SimpleProgramCommandLine in project teamcity-powershell by JetBrains.

the class PowerShellServiceWindows method getStdInCommandLine.

@Override
protected SimpleProgramCommandLine getStdInCommandLine(@NotNull final PowerShellInfo info, @NotNull final Map<String, String> env, @NotNull final String workDir, @NotNull final String command) throws RunBuildException {
    final List<String> args = generateRunScriptArguments(command);
    final String executable = myCommands.getCMDWrappedCommand(info, getEnvironmentVariables());
    final BuildProgressLogger buildLogger = getBuild().getBuildLogger();
    buildLogger.message("Executable wrapper: " + executable);
    buildLogger.message("Wrapper arguments: " + Arrays.toString(args.toArray()));
    buildLogger.message("Command: " + command);
    return new SimpleProgramCommandLine(env, workDir, executable, args);
}
Also used : BuildProgressLogger(jetbrains.buildServer.agent.BuildProgressLogger) SimpleProgramCommandLine(jetbrains.buildServer.agent.runner.SimpleProgramCommandLine)

Example 3 with SimpleProgramCommandLine

use of jetbrains.buildServer.agent.runner.SimpleProgramCommandLine in project teamcity-powershell by JetBrains.

the class PowerShellServiceWindows method getFileCommandLine.

@Override
protected SimpleProgramCommandLine getFileCommandLine(@NotNull final PowerShellInfo info, @NotNull final Map<String, String> env, @NotNull final String workDir, @NotNull final List<String> args) throws RunBuildException {
    final BuildProgressLogger buildLogger = getBuild().getBuildLogger();
    final String command = myCommands.getNativeCommand(info);
    buildLogger.message("Command: " + command);
    buildLogger.message("PowerShell arguments: " + StringUtil.join(args, ", "));
    return new SimpleProgramCommandLine(env, workDir, command, args);
}
Also used : BuildProgressLogger(jetbrains.buildServer.agent.BuildProgressLogger) SimpleProgramCommandLine(jetbrains.buildServer.agent.runner.SimpleProgramCommandLine)

Aggregations

BuildProgressLogger (jetbrains.buildServer.agent.BuildProgressLogger)3 SimpleProgramCommandLine (jetbrains.buildServer.agent.runner.SimpleProgramCommandLine)3 File (java.io.File)1