public class Utils extends Object
| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static File |
getAbsolutePath(File workspaceDir,
File path)
Builds a absolute path from the workspace directory and the given path.
|
static String |
getGeneratedReportDir(JenkinsConfiguration ec)
Creates a String with a path to create for the report dir.
|
static String |
getGeneratedTestDataDir(JenkinsConfiguration ec)
Creates a String with a path to create for the test data dir.
|
static com.piketec.tpt.api.TptApi |
getTptApi(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
TptLogger logger,
hudson.FilePath[] exePaths,
int tptPort,
String tptBindingName,
long startupWaitTime)
Conects to the Tpt Api through a registry.
|
static File |
getTptPluginRootDir() |
static File |
getWorkspaceDir(hudson.FilePath workspace,
TptLogger logger)
Creates a File (workspace) with a FilePath.
|
public static File getWorkspaceDir(hudson.FilePath workspace, TptLogger logger) throws InterruptedException
workspace - The workspace of the jenkisn joblogger - To print some messagesInterruptedException - If the current Job is cancelledpublic static String getGeneratedTestDataDir(JenkinsConfiguration ec)
ec - through the jenkins configuration we get the name and the configuration of the file.
Used to create an unique path.public static String getGeneratedReportDir(JenkinsConfiguration ec)
ec - through the jenkins configuration we get the name and the configuration of the file.
Used to create an unique path.public static File getTptPluginRootDir() throws IOException
IOException - If no Jenkins isntance could be foundpublic static com.piketec.tpt.api.TptApi getTptApi(hudson.model.AbstractBuild<?,?> build,
hudson.Launcher launcher,
TptLogger logger,
hudson.FilePath[] exePaths,
int tptPort,
String tptBindingName,
long startupWaitTime)
throws InterruptedException
build - The current Jenkins buildlauncher - The launcherlogger - The logger to displax messagesexePaths - The paths to TPT executablestptPort - the TPTRMI porttptBindingName - the TPT RMI binding namestartupWaitTime - The wait time to start up TPTInterruptedException - If the Job is cancelledpublic static File getAbsolutePath(File workspaceDir, File path)
null, the current working directory will returned - hopefully it
is inside the workspace.null, the path will returned.null, the workspace will returned.workspaceDir - Current workspace for the build.path - Relative or absolute path.Copyright © 2016–2018 PikeTec GmbH. All rights reserved.