@Override public void execute(ExecSpec execSpec) { if (_environment != null) { execSpec.environment(_environment); } execSpec.setCommandLine(_commandLine); execSpec.setStandardOutput(byteArrayOutputStream); }
public void exec(HelmExecSpec spec) { project.getLogger().warn("Executing: " + spec.getCommandLine()); String[] args = spec.getCommandLine().split("\\s+"); args[0] = getClient().getBinPath(); project.exec(execSpec -> { String tillerNamespace = getTillerNamespace(); Map<String, String> env = new HashMap(); env.putAll(System.getenv()); if (tillerNamespace != null) { env.put("TILLER_NAMESPACE", tillerNamespace); } execSpec.setEnvironment(env); execSpec.setIgnoreExitValue(spec.isIgnoreExitValue()); execSpec.setCommandLine(Arrays.asList(args)); }); }
@Override public void execute(ExecSpec execSpec) { if (workingDirectory != null) { execSpec.setWorkingDir(workingDirectory); } execSpec.setCommandLine((Object[])Commandline.translateCommandline(command)); execSpec.setIgnoreExitValue(ignoreExitValue); if (logStandardOutput) { execSpec.setStandardOutput(standardOutputStream); } execSpec.setErrorOutput(errorOutputStream); } });
@Override public void execute(ExecSpec execSpec) { execSpec.setCommandLine(_getCommandLine()); execSpec.setEnvironment( _getEnvironment(execSpec.getEnvironment())); execSpec.setErrorOutput( new TeeOutputStream(byteArrayOutputStream, System.out)); execSpec.setStandardOutput( new TeeOutputStream(byteArrayOutputStream, System.out)); execSpec.setWorkingDir(getWorkingDir()); }
project.exec(execSpec -> { execSpec.setIgnoreExitValue(spec.isIgnoreExitValue()); execSpec.setCommandLine(parseCommand(finalCommand)); if (spec.getInput() != null) { execSpec.setStandardInput(new ByteArrayInputStream(spec.getInput().getBytes()));
@Override public void execute(ExecSpec execSpec) { execSpec.setCommandLine(_getCommandLine()); execSpec.setEnvironment( _getEnvironment(execSpec.getEnvironment())); execSpec.setErrorOutput( new TeeOutputStream(byteArrayOutputStream, System.out)); execSpec.setStandardOutput( new TeeOutputStream(byteArrayOutputStream, System.out)); execSpec.setWorkingDir(getWorkingDir()); }