Class Components
java.lang.Object
org.jenkinsci.plugins.slave_setup.Components
We are going to store in cache the master delimiter and each node delimiter
while they are deployed.
- Author:
- ByteHeed:, Mikel Royo Gutierrez, Aaron Giovannini
-
Constructor Summary
ConstructorsConstructorDescriptionComponents
(FilePath remoteRootPath, Computer slave) Add construction description, Checks if config exists and creates it, then store all remote objects to be used at deploy timeComponents
(Computer slave) Call Components(slave.getNode().getRootPath(), slave) Add construction description, Checks if config exists and creates it, then store all remote objects to be used at deploy time -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Print only if debug enabled (debug purposes)static void
Just disable debug Modevoid
doConfig()
Iterates over all instance's SetupConfigItem performing/calling a singleSetup for each SetupConfigItemstatic boolean
doConfigSetups
(List<Computer> activeSlaves) Iterates over all given computers performing the doConfig for each computervoid
doSetup()
Slave setup flow, here, the method iterates all SetupItems and if not installed jet, will call doDeploystatic boolean
Iterates over all the given computers list seting up or updating the installation if required.static void
Just enable debug modestatic void
Global printer to return logger to masterboolean
Check if slave contains some setup configured as false,it means that is first time connection or any designed setup.static void
setLogger
(TaskListener listener) Required method to define logging proceduresvoid
singleSetup
(SetupConfigItem item) Performs the execution of the config item on the matching label nodes.
-
Constructor Details
-
Components
Add construction description, Checks if config exists and creates it, then store all remote objects to be used at deploy time- Parameters:
remoteRootPath
- FilePath of remote/slave rootPathslave
- Computer slave.- Throws:
InterruptedException
- Pipe BrokenIOException
- IO error while accessing configFile
-
Components
Call Components(slave.getNode().getRootPath(), slave) Add construction description, Checks if config exists and creates it, then store all remote objects to be used at deploy time- Parameters:
slave
- Computer slave.- Throws:
InterruptedException
- Pipe BrokenIOException
- IO error while accessing configFile
-
-
Method Details
-
newDeploy
public boolean newDeploy()Check if slave contains some setup configured as false,it means that is first time connection or any designed setup. If we want verbose just set listener and verbose will work- Returns:
- Boolean checking if the cache is empty or not to tag it as newDeploy
-
setLogger
Required method to define logging procedures- Parameters:
listener
- TaskListener of the job
-
doSetup
Slave setup flow, here, the method iterates all SetupItems and if not installed jet, will call doDeploy- Throws:
InterruptedException
- If connection is brokenIOException
- IOErrors accessing cacheAbortException
- User close/Cancelled
-
singleSetup
Performs the execution of the config item on the matching label nodes.- Parameters:
item
- SetupConfigItem to perform.- Throws:
InterruptedException
- If connection is brokenIOException
- IOErrors accessing hashCode
-
doConfig
Iterates over all instance's SetupConfigItem performing/calling a singleSetup for each SetupConfigItem- Throws:
InterruptedException
- If connection is brokenIOException
- IOErrors accessing cacheAbortException
- User close/Cancelled
-
doConfigSetups
Iterates over all given computers performing the doConfig for each computer- Parameters:
activeSlaves
- List of the conected slaveComputers- Returns:
- Boolean telling if all the node execution went ok with true and error with false.
-
doSetups
Iterates over all the given computers list seting up or updating the installation if required.- Parameters:
activeSlaves
- List conatining all the instance's slaveComputers- Returns:
- Boolean telling if all the executions went ok with true.
-
debug
Print only if debug enabled (debug purposes)- Parameters:
message
- String to print as DEBUG
-
info
Global printer to return logger to master- Parameters:
message
- String to print as INFO
-
enableDebug
public static void enableDebug()Just enable debug mode -
disableDebug
public static void disableDebug()Just disable debug Mode
-