public class CLIVersionUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
HOST_CONNECTION_PROTOCOL_MINIMUM_VERSION |
| Modifier and Type | Method and Description |
|---|---|
static void |
checkCLICompatibility(hudson.FilePath cliDirectory,
String minimumVersion)
Checks if the version of the installed Topaz CLI is greater or equal to the Jenkins plugins required version.
|
static void |
checkCLICompatibility(String version,
String minimumVersion)
Checks if the version of the installed Topaz CLI is greater or equal to the Jenkins plugins required version.
|
static void |
checkProtocolSupported(String cliVersion)
Checks if encryption protocol is supported on a host connection for the specified CLI version.
|
static String |
getCLIVersion(hudson.FilePath cliDirectory,
String minimumVersion)
Reads the version.xml file from the CLI directory and gets the version number.
|
public static final String HOST_CONNECTION_PROTOCOL_MINIMUM_VERSION
public static String getCLIVersion(hudson.FilePath cliDirectory, String minimumVersion) throws IOException, InterruptedException
cliDirectory - FilePath of the Topaz CLI install directoryminimumVersion - Minimum required CLI version of the Jenkins pluginIOException - if the CLI directory or the version file do not existInterruptedException - if retrieval of CLI version is interrupted by another threadpublic static void checkCLICompatibility(String version, String minimumVersion) throws IOException, InterruptedException
version - current CLI versionminimumVersion - minimum required CLI version of the Jenkins pluginIOException - if an I/O error occurs checking directory existence or getting the CLI versionInterruptedException - if checking directory existence or getting the CLI version is interrupted by another threadpublic static void checkCLICompatibility(hudson.FilePath cliDirectory,
String minimumVersion)
throws IOException,
InterruptedException
cliDirectory - FilePath of the Topaz CLI install directoryminimumVersion - minimum required CLI version of the Jenkins pluginIOException - if an I/O error occurs checking directory existence or getting the CLI versionInterruptedException - if checking directory existence or getting the CLI version is interrupted by another threadpublic static void checkProtocolSupported(String cliVersion) throws hudson.AbortException
The Jenkins job will be aborted if the CLI does not support encryption protocol.
cliVersion - the CLI version to checkhudson.AbortException - if the encryption protocol is not supportedCopyright © 2016–2021. All rights reserved.