public class TEDExecutionRunnerUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
TED_MINIMUM_CLI_VERSION |
static String |
TTT_CLI_200903 |
Constructor and Description |
---|
TEDExecutionRunnerUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
escapeForScript(String input)
Returns an escaped version of the given input String for a Batch or Shell script.
|
static FilePath |
getCLIScriptPath(Launcher launcher,
TaskListener listener,
String fileSeparator,
String osScriptFile)
Returns the path to the script to execute TED CLI
|
static FilePath |
getCLIScriptPath(Launcher launcher,
TaskListener listener,
String fileSeparator,
String osScriptFile,
String minCLIRelease)
Returns the path to the script to execute TED CLI
|
static String |
getCLIVersion(Launcher launcher,
String remoteFileSeparator)
Returns the version of the TED CLI
|
static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials |
getLoginInformation(Item project,
String credentialsId)
Retrieves login information given a credential ID
|
static String |
getTopaWorkbenchCLIPath(Launcher launcher)
Returns the path of the Topaz Workbench CLI, as defined in the global
Jenkins' System settings.
|
static boolean |
isMinimumRelease(Launcher launcher,
TaskListener listener,
String remoteFileSeparator,
String versionNumber)
Returns if the TED CLI is greater or equal to the passed version.
|
static void |
logJenkinsAndPluginVersion(TaskListener listener)
Logs the Jenkins and TED Plugin versions
|
public static final String TTT_CLI_200903
public static final String TED_MINIMUM_CLI_VERSION
public static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials getLoginInformation(Item project, String credentialsId)
project
- the Jenkins projectcredentialsId
- The credendtial id for the user.public static FilePath getCLIScriptPath(Launcher launcher, TaskListener listener, String fileSeparator, String osScriptFile) throws IOException, InterruptedException
launcher
- An instance Launcher
for launching the
script.listener
- An instance of TaskListener
for the task.fileSeparator
- The file separator for the system on which the script
will run.osScriptFile
- The name of the operating system dependent script file
to run.FilePath
for the CLI directoryIOException
- If the CLI directory does not exist.InterruptedException
- If unable to get CLI directory.public static FilePath getCLIScriptPath(Launcher launcher, TaskListener listener, String fileSeparator, String osScriptFile, String minCLIRelease) throws IOException, InterruptedException
launcher
- An instance Launcher
for launching the
script.listener
- An instance of TaskListener
for the task.fileSeparator
- The file separator for the system on which the script
will run.osScriptFile
- The name of the operating system dependent script file
to run.minCLIRelease
- The minimum CLI release required to run the script.FilePath
for the CLI directoryIOException
- If the CLI directory does not exist.InterruptedException
- If unable to get CLI directory.public static String getTopaWorkbenchCLIPath(Launcher launcher)
launcher
- An instance Launcher
for launching the script.public static String getCLIVersion(Launcher launcher, String remoteFileSeparator) throws IOException, InterruptedException
launcher
- The machine that the files will be checked out.remoteFileSeparator
- The remote file separatorFilePath
for the CLI directoryIOException
- If the CLI directory does not exist.InterruptedException
- If unable to get CLI directory.public static void logJenkinsAndPluginVersion(TaskListener listener)
listener
- An instance of TaskListener
for the task.public static boolean isMinimumRelease(Launcher launcher, TaskListener listener, String remoteFileSeparator, String versionNumber)
launcher
- The machine that the files will be checked out.listener
- An instance of TaskListener
for the task.remoteFileSeparator
- The remote file separatorversionNumber
- The minimum TED CLI version number to check against.true
if this node supports using the local configuration directory, otherwise false
.Copyright © 2016–2023. All rights reserved.