public class SetupDeployer extends Object
Constructor and Description |
---|
SetupDeployer() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkLabelsForComputerOrNull(Computer c,
SetupConfigItem item)
Checks if this script should be executed on the target computer.
|
static boolean |
copyFiles(File localPath,
FilePath remotePath)
Copy localPath into remotePath and return boolean if operation succeded
|
static EnvVars |
createEnvVarsForComputer(Computer c)
Gets the current enviroment variables for the given computer
|
static int |
executeScriptOnMaster(TaskListener listener,
String script,
EnvVars enviroment)
Executes the given script on Jenkins MasterNode with his envVars logging with given listener
|
static int |
executeScriptOnSlave(TaskListener listener,
String script,
FilePath root,
EnvVars enviroment)
Executes the given script on the given slave independently of their OSs.
|
static String |
stringFy(Object obj)
Linked with Utils StringFy Useful to print object data into string
|
public static String stringFy(Object obj)
public static boolean copyFiles(File localPath, FilePath remotePath) throws IOException, InterruptedException
InterruptedException
- BrokenPipeIOException
- IO error while accesing diskpublic static boolean checkLabelsForComputerOrNull(Computer c, SetupConfigItem item)
public static int executeScriptOnSlave(TaskListener listener, String script, FilePath root, EnvVars enviroment) throws IOException, InterruptedException
listener
- TaskListener of the jobscript
- String script to executeroot
- Slave rootPath as jenkins.FilePathenviroment
- Enviroment variables for this job on this node. From SetupDeployer.createEnvVars(L)InterruptedException
- BrokenPipeIOException
- IO error while accesing diskpublic static int executeScriptOnMaster(TaskListener listener, String script, EnvVars enviroment)
script
- Script to execute on Masterlistener
- Job's listener handleenviroment
- Enviroment's EnvVars from
SetupDeployer.createEnvVarsForComputer(c)Copyright © 2016–2023. All rights reserved.