Class SetupConfigItem
java.lang.Object
hudson.model.AbstractDescribableImpl<SetupConfigItem>
org.jenkinsci.plugins.slave_setup.SetupConfigItem
- All Implemented Interfaces:
Describable<SetupConfigItem>
Represents a setup config for one set of labels. It may have its own prepare script, files to copy and command line.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorSetupConfigItem
(String prepareScript, File filesDir, String commandLine, boolean deployNow, String assignedLabelString) Constructor uesd to create the setup config instance -
Method Summary
Modifier and TypeMethodDescriptionGets the textual representation of the assigned label as it was entered by the user.Returns the command line code.boolean
Returns true if the setup config should be deployed on save of the jenkins config page.Returns the directory containing the setup relevant files and sub directoriesReturns the prepare script code.int
hashCode()
Every ConfigItem have a unique identifier for content which will match with slave hashCodeboolean
Returns the prepare script executed status.Useful function to get same name as needs to be under slave cache.void
setAssignedLabelString
(String assignedLabelString) sets the assigned slave's labelsvoid
setCommandLine
(String commandLine) sets the command line code.void
setDeployNow
(boolean deployNow) sets the deploy flag.void
setFilesDir
(File filesDir) Sets the files dir.void
setPrepareScript
(String prepareScript) Sets the prepare script codevoid
setPrepareScriptExecuted
(boolean prepareScriptExecuted) sets the prepare script executed status.Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Field Details
-
DELIMITER
- See Also:
-
-
Constructor Details
-
Method Details
-
getPrepareScript
Returns the prepare script code.- Returns:
- the prepare script code
-
setPrepareScript
Sets the prepare script code- Parameters:
prepareScript
- the script code as string
-
getFilesDir
Returns the directory containing the setup relevant files and sub directories- Returns:
- the directory as File
-
getCommandLine
Returns the command line code.- Returns:
- the command line code
-
getDeployNow
public boolean getDeployNow()Returns true if the setup config should be deployed on save of the jenkins config page.- Returns:
- true if the setup config should be deployed on save of the jenkins config page
-
setFilesDir
Sets the files dir.- Parameters:
filesDir
- firectory to copy the setup files and sub directories from.
-
setCommandLine
sets the command line code.- Parameters:
commandLine
- the command line code
-
setDeployNow
public void setDeployNow(boolean deployNow) sets the deploy flag.- Parameters:
deployNow
- the deploy flag
-
isPrepareScriptExecuted
public boolean isPrepareScriptExecuted()Returns the prepare script executed status.- Returns:
- the prepare script executed status
-
setPrepareScriptExecuted
public void setPrepareScriptExecuted(boolean prepareScriptExecuted) sets the prepare script executed status.- Parameters:
prepareScriptExecuted
- the prepare script executed status
-
getAssignedLabelString
Gets the textual representation of the assigned label as it was entered by the user.- Returns:
- assigned label as string
-
setAssignedLabelString
sets the assigned slave's labels- Parameters:
assignedLabelString
- labels to be assigned to the agent
-
hashCode
public int hashCode()Every ConfigItem have a unique identifier for content which will match with slave hashCode -
remoteCache
Useful function to get same name as needs to be under slave cache.- Returns:
- String containing tag + DELIMITER + hashCode()
-