Interface ProgramCommandLine
-
- All Known Implementing Classes:
SimpleProgramCommandLine
@UserImplemented(adapterClass=SimpleProgramCommandLine.class) public interface ProgramCommandLine
interface providing information to start the process
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description List<String>
getArguments()
All quotations are done property inside Java Runtimedefault String
getCommandLineForLogging(PasswordReplacer passwordReplacer)
Map<String,String>
getEnvironment()
String
getExecutablePath()
Returns either full pathrelative path to working dirsimply command name to be resolved by OS on the build agent to runString
getWorkingDirectory()
-
-
-
Method Detail
-
getExecutablePath
@NotNull String getExecutablePath() throws RunBuildException
Returns either- full path
- relative path to working dir
- simply command name to be resolved by OS on the build agent
- Returns:
- file path to execute
- Throws:
RunBuildException
- on error in parameters or agent's machine environment
-
getWorkingDirectory
@NotNull String getWorkingDirectory() throws RunBuildException
- Returns:
- executable working directory either relative on build checkout directory or absolute path
- Throws:
RunBuildException
- on error in parameters or agent's machine environment
-
getArguments
@NotNull List<String> getArguments() throws RunBuildException
All quotations are done property inside Java Runtime- Returns:
- arguments to be sent to process
- Throws:
RunBuildException
- on error in parameters or agent's machine environment
-
getCommandLineForLogging
default String getCommandLineForLogging(PasswordReplacer passwordReplacer) throws RunBuildException
- Returns:
- command line for logging, i.e. this line will be logged into build and agent logs. So the plugin should replace all passwords in this command line using provided password replacer.
- Throws:
RunBuildException
- Since:
- 2022.10
-
getEnvironment
@NotNull Map<String,String> getEnvironment() throws RunBuildException
- Returns:
- map of all environment variables to be set for process
- Throws:
RunBuildException
- on error in parameters or agent's machine environment
-
-