Package com.uipath.uipathpackage
Class UiPathRunJob
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Recorder
-
- com.uipath.uipathpackage.UiPathRunJob
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Publisher>
,BuildStep
,SimpleBuildStep
public class UiPathRunJob extends Recorder implements SimpleBuildStep
Class responsible for running a job in orchestrator instance provided by the user.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UiPathRunJob.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.tasks.Publisher
Publisher.DescriptorExtensionListImpl
-
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 UiPathRunJob(java.lang.String processName, java.lang.String parametersFilePath, StartProcessDtoJobPriority priority, SelectEntry strategy, SelectEntry jobType, java.lang.String resultFilePath, java.lang.Integer timeout, java.lang.Boolean failWhenJobFails, java.lang.Boolean waitForJobCompletion, TraceLevel traceLevel, java.lang.String orchestratorAddress, java.lang.String orchestratorTenant, java.lang.String folderName, SelectEntry credentials)
Data bound constructor which is responsible for setting/saving of the values provided by the user
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SelectEntry
getCredentials()
Credentials ID, appearing as choice and will be responsible to extract credentials and use for orchestrator connectionjava.lang.Boolean
getFailWhenJobFails()
java.lang.String
getFolderName()
Orchestrator FolderSelectEntry
getJobType()
java.lang.String
getOrchestratorAddress()
Base orchestrator URLjava.lang.String
getOrchestratorTenant()
Orchestrator Tenantjava.lang.String
getParametersFilePath()
parametersStartProcessDtoJobPriority
getPriority()
priorityjava.lang.String
getProcessName()
process nameBuildStepMonitor
getRequiredMonitorService()
Declares the scope of the synchronization monitor thisBuildStep
expects from outside.java.lang.String
getResultFilePath()
SelectEntry
getStrategy()
java.lang.Integer
getTimeout()
TraceLevel
getTraceLevel()
traceLeveljava.lang.Boolean
getWaitForJobCompletion()
void
perform(Run<?,?> run, FilePath workspace, EnvVars env, Launcher launcher, TaskListener listener)
Run this step.void
setFailWhenJobFails(java.lang.Boolean failWhenJobFails)
void
setParametersFilePath(java.lang.String parametersFilePath)
void
setPriority(StartProcessDtoJobPriority priority)
void
setProcessName(java.lang.String processName)
void
setResultFilePath(java.lang.String resultFilePath)
void
setStrategy(SelectEntry strategy)
void
setTimeout(java.lang.Integer timeout)
void
setTraceLevel(TraceLevel traceLevel)
void
setWaitForJobCompletion(java.lang.Boolean waitForJobCompletion)
-
Methods inherited from class hudson.tasks.Recorder
getDescriptor
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, needsToRunAfterFinalized, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
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, perform, prebuild
-
Methods inherited from interface jenkins.tasks.SimpleBuildStep
perform, perform, requiresWorkspace
-
-
-
-
Constructor Detail
-
UiPathRunJob
@DataBoundConstructor public UiPathRunJob(java.lang.String processName, java.lang.String parametersFilePath, StartProcessDtoJobPriority priority, SelectEntry strategy, SelectEntry jobType, java.lang.String resultFilePath, java.lang.Integer timeout, java.lang.Boolean failWhenJobFails, java.lang.Boolean waitForJobCompletion, TraceLevel traceLevel, java.lang.String orchestratorAddress, java.lang.String orchestratorTenant, java.lang.String folderName, SelectEntry credentials)
Data bound constructor which is responsible for setting/saving of the values provided by the user- Parameters:
processName
- Process NameparametersFilePath
- The full path to a json input file.priority
- The priority of job runs. One of the following values: Low, Normal, High. (default Normal)strategy
- StrategyjobType
- Type of job which needs to runresultFilePath
- The full path to a json file or a folder where the result json file will be created.timeout
- The timeout for job executions in seconds. (default 1800)failWhenJobFails
- The command fails when at least one job fails. (default true)waitForJobCompletion
- Wait for job runs completion. (default true)traceLevel
- The trace logging level. One of the following values: None, Critical, Error, Warning, Information, Verbose. (default None)orchestratorAddress
- Orchestrator base URLorchestratorTenant
- Orchestrator tenantfolderName
- Orchestrator foldercredentials
- Orchestrator credentials
-
-
Method Detail
-
getJobType
public SelectEntry getJobType()
-
setStrategy
@DataBoundSetter public void setStrategy(SelectEntry strategy)
-
getStrategy
public SelectEntry getStrategy()
- Returns:
- SelectEntry strategy
-
getCredentials
public SelectEntry getCredentials()
Credentials ID, appearing as choice and will be responsible to extract credentials and use for orchestrator connection- Returns:
- SelectEntry credentials
-
setProcessName
@DataBoundSetter public void setProcessName(java.lang.String processName)
-
getProcessName
public java.lang.String getProcessName()
process name- Returns:
- String processName
-
setPriority
@DataBoundSetter public void setPriority(StartProcessDtoJobPriority priority)
-
getPriority
public StartProcessDtoJobPriority getPriority()
priority- Returns:
- StartProcessDtoJobPriority priority
-
setParametersFilePath
@DataBoundSetter public void setParametersFilePath(java.lang.String parametersFilePath)
-
getParametersFilePath
public java.lang.String getParametersFilePath()
parameters- Returns:
- String parameters
-
getOrchestratorAddress
public java.lang.String getOrchestratorAddress()
Base orchestrator URL- Returns:
- String orchestratorAddress
-
getOrchestratorTenant
public java.lang.String getOrchestratorTenant()
Orchestrator Tenant- Returns:
- String orchestratorTenant
-
getFolderName
public java.lang.String getFolderName()
Orchestrator Folder- Returns:
- String folderName
-
setFailWhenJobFails
@DataBoundSetter public void setFailWhenJobFails(java.lang.Boolean failWhenJobFails)
-
getFailWhenJobFails
public java.lang.Boolean getFailWhenJobFails()
-
setWaitForJobCompletion
@DataBoundSetter public void setWaitForJobCompletion(java.lang.Boolean waitForJobCompletion)
-
getWaitForJobCompletion
public java.lang.Boolean getWaitForJobCompletion()
-
setResultFilePath
@DataBoundSetter public void setResultFilePath(java.lang.String resultFilePath)
-
setTraceLevel
@DataBoundSetter public void setTraceLevel(TraceLevel traceLevel)
-
getTraceLevel
public TraceLevel getTraceLevel()
traceLevel- Returns:
- TraceLevel traceLevel
-
getResultFilePath
public java.lang.String getResultFilePath()
-
setTimeout
@DataBoundSetter public void setTimeout(java.lang.Integer timeout)
-
getTimeout
public java.lang.Integer getTimeout()
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
Declares the scope of the synchronization monitor thisBuildStep
expects from outside.BuildStepMonitor.NONE
No external synchronization is performed on this build step. This is the most efficient, and thus the recommended value for newer plugins. Wherever necessary, you can directly useCheckPoint
s to perform necessary synchronizations.- Specified by:
getRequiredMonitorService
in interfaceBuildStep
- Returns:
- BuildStepMonitor BuildStepMonitor.NONE
-
perform
public void perform(@Nonnull Run<?,?> run, @Nonnull FilePath workspace, @Nonnull EnvVars env, @Nonnull Launcher launcher, @Nonnull TaskListener listener) throws java.lang.InterruptedException, java.io.IOException
Run this step.- Specified by:
perform
in interfaceSimpleBuildStep
- Parameters:
run
- a build this is running as a part ofworkspace
- a workspace to use for any file operationslauncher
- a way to start processeslistener
- a place to send output- Throws:
java.lang.InterruptedException
- if the step is interruptedjava.io.IOException
- if something goes wrong
-
-