| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractGenruleStep.CommandString |
workingDirectory| Constructor and Description |
|---|
AbstractGenruleStep(ProjectFilesystem projectFilesystem,
AbstractGenruleStep.CommandString commandString,
AbsPath workingDirectory) |
AbstractGenruleStep(ProjectFilesystem projectFilesystem,
AbstractGenruleStep.CommandString commandString,
Path workingDirectory) |
AbstractGenruleStep(ProjectFilesystem projectFilesystem,
AbstractGenruleStep.CommandString commandString,
Path workingDirectory,
ProgramRunner programRunner) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addEnvironmentVariables(ExecutionContext context,
com.google.common.collect.ImmutableMap.Builder<String,String> environmentVariablesBuilder) |
StepExecutionResult |
execute(ExecutionContext context) |
com.google.common.collect.ImmutableMap<String,String> |
getEnvironmentVariables(ExecutionContext context)
Returns the environment variables to include when running this
ShellStep. |
String |
getScriptFileContents(ExecutionContext context) |
Path |
getScriptFilePath(ExecutionContext context) |
protected com.google.common.collect.ImmutableList<String> |
getShellCommandArgsForDescription(ExecutionContext context) |
protected com.google.common.collect.ImmutableList<String> |
getShellCommandInternal(ExecutionContext context)
Implementations of this method should not have any observable side-effects.
|
String |
getShortName() |
protected boolean |
shouldPrintStderr(Verbosity verbosity) |
addOptions, getDescription, getDuration, getExitCodeFromResult, getShellCommand, getStderr, getStdin, getStdout, getTimeout, getTimeoutHandler, shouldPrintStdoutpublic AbstractGenruleStep(ProjectFilesystem projectFilesystem, AbstractGenruleStep.CommandString commandString, Path workingDirectory, ProgramRunner programRunner)
public AbstractGenruleStep(ProjectFilesystem projectFilesystem, AbstractGenruleStep.CommandString commandString, Path workingDirectory)
public AbstractGenruleStep(ProjectFilesystem projectFilesystem, AbstractGenruleStep.CommandString commandString, AbsPath workingDirectory)
public String getShortName()
public StepExecutionResult execute(ExecutionContext context) throws IOException, InterruptedException
execute in interface Stepexecute in class ShellStepIOExceptionInterruptedExceptionprotected com.google.common.collect.ImmutableList<String> getShellCommandInternal(ExecutionContext context)
ShellStepgetShellCommandInternal in class ShellStepprotected com.google.common.collect.ImmutableList<String> getShellCommandArgsForDescription(ExecutionContext context)
getShellCommandArgsForDescription in class ShellSteppublic com.google.common.collect.ImmutableMap<String,String> getEnvironmentVariables(ExecutionContext context)
ShellStepShellStep.
By default, this method returns an empty map.
getEnvironmentVariables in class ShellStepcontext - that may be useful when determining environment variables to include.protected boolean shouldPrintStderr(Verbosity verbosity)
shouldPrintStderr in class ShellStepExecutionContext. If false, stderr will only be printed on
error and only if verbosity is set to standard information.public String getScriptFileContents(ExecutionContext context)
public Path getScriptFilePath(ExecutionContext context) throws IOException
IOExceptionprotected abstract void addEnvironmentVariables(ExecutionContext context, com.google.common.collect.ImmutableMap.Builder<String,String> environmentVariablesBuilder)