Package com.piketec.jenkins.plugins.tpt
Class TptPluginSlave
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Builder
-
- com.piketec.jenkins.plugins.tpt.TptPluginSlave
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,SimpleBuildStep
public class TptPluginSlave extends Builder implements SimpleBuildStep
Plugin executes a single given TPT test case. Intended to be used in the job started byTptPluginDistributingJobExecutor
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TptPluginSlave.DescriptorImpl
The Descriptor ofTptPluginSlave
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.tasks.SimpleBuildStep
SimpleBuildStep.LastBuildAction, SimpleBuildStep.LastBuildActionFactory
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description TptPluginSlave(String exePaths)
Those arguments are processed and then passed to theTptPluginWorkerJobExecutor
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getArguments()
Common command line opts.TptPluginSlave.DescriptorImpl
getDescriptor()
String
getExePaths()
String
getTptBindingName()
String
getTptPort()
String
getTptStartUpWaitTime()
void
perform(Run<?,?> run, FilePath workspace, EnvVars env, Launcher launcher, TaskListener listener)
It collects the necesary data (tpt exe path, tpt Port, tpt bindingname and tpt expandedTptStartupWaitTime) from the environment.void
setArguments(String arguments)
void
setTptBindingName(String tptBindingName)
void
setTptPort(String tptPort)
void
setTptStartUpWaitTime(String tptStartUpWaitTime)
-
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, perform, prebuild
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.tasks.BuildStep
getProjectAction, getProjectActions, getRequiredMonitorService, perform, prebuild
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Constructor Detail
-
TptPluginSlave
@DataBoundConstructor public TptPluginSlave(String exePaths)
Those arguments are processed and then passed to theTptPluginWorkerJobExecutor
. This class is used as a wrapper- Parameters:
exePaths
- the paths to the Tpt Executables
-
-
Method Detail
-
getExePaths
public String getExePaths()
- Returns:
- The list of paths to possible TPT-installations.
-
getArguments
public String getArguments()
Common command line opts. Delimiter between the options is one or more spaces. Inside doublequotes spaces have no special meaning.- Returns:
- 0 or more options for tpt.
-
setArguments
@DataBoundSetter public void setArguments(String arguments)
-
getTptBindingName
public String getTptBindingName()
- Returns:
- the RMI binding name for TPT
-
setTptBindingName
@DataBoundSetter public void setTptBindingName(String tptBindingName)
- Parameters:
tptBindingName
- The RMI binding name for TPT
-
getTptPort
public String getTptPort()
- Returns:
- The port of the RMI registry
-
setTptPort
@DataBoundSetter public void setTptPort(String tptPort)
- Parameters:
tptPort
- The port of the RMI registry
-
getTptStartUpWaitTime
public String getTptStartUpWaitTime()
- Returns:
- The time waited before trying to get the API handle after starting TPT
-
setTptStartUpWaitTime
@DataBoundSetter public void setTptStartUpWaitTime(String tptStartUpWaitTime)
- Parameters:
tptStartUpWaitTime
- The time to wait for TPT to start
-
perform
public void perform(Run<?,?> run, FilePath workspace, EnvVars env, Launcher launcher, TaskListener listener) throws InterruptedException, IOException
It collects the necesary data (tpt exe path, tpt Port, tpt bindingname and tpt expandedTptStartupWaitTime) from the environment. Then collects the necesary data from the workload (put by the TptPluginMasterJobExecutor). After collecting all the necesary data it creates a newTptPluginWorkerJobExecutor
and execute it. This method will be called from Jenkins when a build for a worker job is scheduled. @see retryableJob. The logic is that the retryableJob schedules builds for the worker job and those builds will be executed here.- Specified by:
perform
in interfaceSimpleBuildStep
- Throws:
InterruptedException
IOException
-
getDescriptor
public TptPluginSlave.DescriptorImpl getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Builder>
- Overrides:
getDescriptor
in classBuilder
-
-