Class MultiJobBuilder
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Builder
-
- com.tikal.jenkins.plugins.multijob.MultiJobBuilder
-
- All Implemented Interfaces:
ExtensionPoint
,DependecyDeclarer
,Describable<Builder>
,BuildStep
,DependencyDeclarer
public class MultiJobBuilder extends Builder implements DependecyDeclarer
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MultiJobBuilder.ContinuationCondition
static class
MultiJobBuilder.DescriptorImpl
static class
MultiJobBuilder.ExecutionType
class
MultiJobBuilder.SubJobWorker
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static String
BUILD_ALWAYS_KEY
The name of the parameter in the build.getBuildVariables() to enable the job build, regardless of scm changes.static String
JOB_IS_BUILDABLE
The name of the new variable which stores if the job is buildable or not.static String
JOB_STATUS
The name of the new variable which stores the status of the current job.static String
PERSISTENT_VARS_PREFIX
A prefix for env vars which should be loaded inprebuild(Build, BuildListener)
.-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description MultiJobBuilder(String phaseName, List<PhaseJobsConfig> phaseJobs, MultiJobBuilder.ContinuationCondition continuationCondition)
Deprecated.MultiJobBuilder(String phaseName, List<PhaseJobsConfig> phaseJobs, MultiJobBuilder.ContinuationCondition continuationCondition, MultiJobBuilder.ExecutionType executionType, String quietPeriodGroovy)
-
Method Summary
-
Methods inherited from class hudson.tasks.Builder
all, getDescriptor, getRequiredMonitorService
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, getProjectActions, perform, prebuild
-
-
-
-
Field Detail
-
BUILD_ALWAYS_KEY
public static final String BUILD_ALWAYS_KEY
The name of the parameter in the build.getBuildVariables() to enable the job build, regardless of scm changes.- See Also:
- Constant Field Values
-
JOB_STATUS
public static final String JOB_STATUS
The name of the new variable which stores the status of the current job. The state is the name of the corresponding value inStatusJob
enum.- Since:
- 1.0.0
- See Also:
StatusJob.isBuildable()
, Constant Field Values
-
JOB_IS_BUILDABLE
public static final String JOB_IS_BUILDABLE
The name of the new variable which stores if the job is buildable or not. This value is getted from theStatusJob.isBuildable()
. The only values of this variable aretrue
when the job is buildable, orfalse
when the job is not buildable.- Since:
- 1.0.0
- See Also:
StatusJob.isBuildable()
, Constant Field Values
-
PERSISTENT_VARS_PREFIX
public static final String PERSISTENT_VARS_PREFIX
A prefix for env vars which should be loaded inprebuild(Build, BuildListener)
. this will happen only when build was triggered by theMultiJobResumeControl
action- Since:
- 1.0.0
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MultiJobBuilder
@Deprecated public MultiJobBuilder(String phaseName, List<PhaseJobsConfig> phaseJobs, MultiJobBuilder.ContinuationCondition continuationCondition)
Deprecated.
-
MultiJobBuilder
@DataBoundConstructor public MultiJobBuilder(String phaseName, List<PhaseJobsConfig> phaseJobs, MultiJobBuilder.ContinuationCondition continuationCondition, MultiJobBuilder.ExecutionType executionType, String quietPeriodGroovy)
-
-
Method Detail
-
expandToken
public String expandToken(String toExpand, AbstractBuild<?,?> build, BuildListener listener)
-
evalCondition
public boolean evalCondition(String condition, AbstractBuild<?,?> build, BuildListener listener)
-
perform
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException
- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classBuildStepCompatibilityLayer
- Throws:
InterruptedException
IOException
-
checkPhaseTermination
protected boolean checkPhaseTermination(SubTask subTask, List<SubTask> subTasks, BuildListener listener)
-
getPhaseName
public String getPhaseName()
-
setPhaseName
public void setPhaseName(String phaseName)
-
getPhaseJobs
public List<PhaseJobsConfig> getPhaseJobs()
-
setPhaseJobs
public void setPhaseJobs(List<PhaseJobsConfig> phaseJobs)
-
phaseNameExist
public boolean phaseNameExist(String phaseName)
-
buildDependencyGraph
public void buildDependencyGraph(AbstractProject owner, DependencyGraph graph)
- Specified by:
buildDependencyGraph
in interfaceDependencyDeclarer
-
onJobDeleted
public boolean onJobDeleted(String oldName)
-
getContinuationCondition
public MultiJobBuilder.ContinuationCondition getContinuationCondition()
-
setContinuationCondition
public void setContinuationCondition(MultiJobBuilder.ContinuationCondition continuationCondition)
-
setExecutionType
public void setExecutionType(MultiJobBuilder.ExecutionType executionType)
-
getExecutionType
public MultiJobBuilder.ExecutionType getExecutionType()
-
getQuietPeriodGroovy
public String getQuietPeriodGroovy()
-
prebuild
public boolean prebuild(Build build, BuildListener listener)
-
-