Package com.atlassian.bamboo.process
Class ExternalProcessBuilder
- java.lang.Object
-
- com.atlassian.bamboo.process.ExternalProcessBuilder
-
@PublicApi public final class ExternalProcessBuilder extends Object
Builder to createExternalProcess
s using theProcessService
- Since:
- 3.1
-
-
Constructor Summary
Constructors Constructor Description ExternalProcessBuilder()
-
Method Summary
-
-
-
Method Detail
-
path
public ExternalProcessBuilder path(@NotNull @NotNull String path)
-
path
public ExternalProcessBuilder path(@NotNull @NotNull List<String> path)
-
command
public ExternalProcessBuilder command(@NotNull @NotNull List<String> command)
-
commandFromString
public ExternalProcessBuilder commandFromString(@NotNull @NotNull String commandString)
Splits the given command string into arguments and adds them to the builder- Parameters:
commandString
- to split into multiple parts and add to the list of commands- Returns:
- builder
- Since:
- 3.1.4
-
env
public ExternalProcessBuilder env(@NotNull @NotNull Map<String,String> env)
Adds env variables. If variable name equals SystemProperty.PATH.getKey() the value is appended to the front of existing paths- Parameters:
env
- key -> value map of environment variables to add- Returns:
- builder
-
env
public ExternalProcessBuilder env(@NotNull @NotNull String key, @NotNull @NotNull String value)
Adds env variable. If variable name equals SystemProperty.PATH.getKey() the value is appended to the front of existing paths.- Parameters:
key
- name of environment variablevalue
- value of environment variable- Returns:
- builder
-
input
public ExternalProcessBuilder input(@Nullable @Nullable String input)
Set the standard input to be passed to the spawned process.
-
workingDirectory
public ExternalProcessBuilder workingDirectory(@NotNull @NotNull File workingDirectory)
-
runWithPowershell
public ExternalProcessBuilder runWithPowershell(boolean runWithPowershell)
-
setBackgroundProcess
public ExternalProcessBuilder setBackgroundProcess(boolean value)
-
setCompletionCallback
public ExternalProcessBuilder setCompletionCallback(@Nullable @Nullable Runnable completionCallback)
-
isBackgroundProcess
public boolean isBackgroundProcess()
-
getCommandExecutable
@Nullable public @Nullable String getCommandExecutable()
-
getWorkingDirectory
public File getWorkingDirectory()
-
isRunWithPowershell
public boolean isRunWithPowershell()
-
dockerContainerId
public ExternalProcessBuilder dockerContainerId(String dockerContainer)
-
getDockerContainerId
public String getDockerContainerId()
-
isUseWindowsBatFilesForWhitespaceHandling
public boolean isUseWindowsBatFilesForWhitespaceHandling()
-
setUseWindowsBatFilesForWhitespaceHandling
public ExternalProcessBuilder setUseWindowsBatFilesForWhitespaceHandling(boolean useWindowsBatFilesForWhitespaceHandling)
-
getInput
@Nullable public @Nullable String getInput()
-
-