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, shouldPrintStdout
public 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 Step
execute
in class ShellStep
IOException
InterruptedException
protected com.google.common.collect.ImmutableList<String> getShellCommandInternal(ExecutionContext context)
ShellStep
getShellCommandInternal
in class ShellStep
protected com.google.common.collect.ImmutableList<String> getShellCommandArgsForDescription(ExecutionContext context)
getShellCommandArgsForDescription
in class ShellStep
public com.google.common.collect.ImmutableMap<String,String> getEnvironmentVariables(ExecutionContext context)
ShellStep
ShellStep
.
By default, this method returns an empty map.
getEnvironmentVariables
in class ShellStep
context
- that may be useful when determining environment variables to include.protected boolean shouldPrintStderr(Verbosity verbosity)
shouldPrintStderr
in class ShellStep
ExecutionContext
. 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
IOException
protected abstract void addEnvironmentVariables(ExecutionContext context, com.google.common.collect.ImmutableMap.Builder<String,String> environmentVariablesBuilder)