Class ClientCommandBuilder
- java.lang.Object
-
- com.openshift.jenkins.plugins.util.ClientCommandBuilder
-
- All Implemented Interfaces:
Serializable
public class ClientCommandBuilder extends Object implements Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClientCommandBuilder.GetOsType
static class
ClientCommandBuilder.OsType
-
Field Summary
Fields Modifier and Type Field Description List<String>
advArgs
String
caPath
int
logLevel
protected List<String>
options
String
project
String
server
boolean
skipTLSVerify
boolean
streamStdOutToConsolePrefix
protected String
token
protected List<String>
userArgs
String
verb
protected List<String>
verbArgs
-
Constructor Summary
Constructors Constructor Description ClientCommandBuilder(String server, String project, boolean skipTLSVerify, String caPath, String verb, List<String> advArgs, List<String> verbArgs, List<String> userArgs, List<String> options, String token, int logLevel, boolean streamStdOutToConsolePrefix)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
asString(boolean redacted)
String[]
asStringArray(boolean redacted)
List<String>
buildCommand(boolean redacted)
Builds the command line to invoke.static String[]
fixPathInCommandArray(String[] command, EnvVars envVars, TaskListener listener, FilePath filePath, Launcher launcher, boolean verbose)
static ClientCommandBuilder.OsType
getOsFromPlatform()
boolean
wrapperInQuotes()
-
-
-
Field Detail
-
server
public final String server
-
project
public final String project
-
skipTLSVerify
public final boolean skipTLSVerify
-
caPath
public final String caPath
-
verb
public final String verb
-
token
protected final String token
-
logLevel
public final int logLevel
-
streamStdOutToConsolePrefix
public final boolean streamStdOutToConsolePrefix
-
-
Method Detail
-
getOsFromPlatform
public static ClientCommandBuilder.OsType getOsFromPlatform()
-
fixPathInCommandArray
public static String[] fixPathInCommandArray(String[] command, EnvVars envVars, TaskListener listener, FilePath filePath, Launcher launcher, boolean verbose) throws IOException, InterruptedException, RuntimeException
-
buildCommand
public List<String> buildCommand(boolean redacted)
Builds the command line to invoke.- Parameters:
redacted
- Requests the command line be constructed for logging purposes. Sensitive information will be stripped. Verbose information wil be stripped unless we are in logLevel mode.- Returns:
- A list of command line arguments for the 'oc' command.
-
asString
public String asString(boolean redacted)
-
asStringArray
public String[] asStringArray(boolean redacted)
-
wrapperInQuotes
public boolean wrapperInQuotes()
-
-