Class ConditionalBuilder
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Builder
-
- org.jenkinsci.plugins.conditionalbuildstep.ConditionalBuilder
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Builder>
,BuildStep
,DependencyDeclarer
public class ConditionalBuilder extends Builder implements DependencyDeclarer
A buildstep wrapping any number of other buildsteps, controlling their execution based on a defined condition.- Author:
- Dominik Bartholdi (imod), Chris Johnson (cjo9900)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConditionalBuilder.DescriptorImpl
-
Nested classes/interfaces inherited from interface hudson.tasks.BuildStep
BuildStep.PublisherList
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description ConditionalBuilder(org.jenkins_ci.plugins.run_condition.RunCondition runCondition, org.jenkins_ci.plugins.run_condition.BuildStepRunner runner)
Deprecated.No longer needed as part of the Constructor UseConditionalBuilder(RunCondition, BuildStepRunner, List)
ConditionalBuilder(org.jenkins_ci.plugins.run_condition.RunCondition runCondition, org.jenkins_ci.plugins.run_condition.BuildStepRunner runner, List<BuildStep> conditionalbuilders)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
buildDependencyGraph(AbstractProject project, DependencyGraph graph)
List<BuildStep>
getConditionalbuilders()
ConditionalBuilder.DescriptorImpl
getDescriptor()
Collection
getProjectActions(AbstractProject<?,?> project)
org.jenkins_ci.plugins.run_condition.RunCondition
getRunCondition()
org.jenkins_ci.plugins.run_condition.BuildStepRunner
getRunner()
boolean
perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)
boolean
prebuild(AbstractBuild<?,?> build, BuildListener listener)
Object
readResolve()
void
setConditionalbuilders(List<BuildStep> conditionalbuilders)
Deprecated.No longer needed as part of the DataBoundConstructor-
Methods inherited from class hudson.tasks.Builder
all, getRequiredMonitorService, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectAction, perform
-
-
-
-
Constructor Detail
-
ConditionalBuilder
@Deprecated public ConditionalBuilder(org.jenkins_ci.plugins.run_condition.RunCondition runCondition, org.jenkins_ci.plugins.run_condition.BuildStepRunner runner)
Deprecated.No longer needed as part of the Constructor UseConditionalBuilder(RunCondition, BuildStepRunner, List)
-
-
Method Detail
-
getRunner
public org.jenkins_ci.plugins.run_condition.BuildStepRunner getRunner()
-
getRunCondition
public org.jenkins_ci.plugins.run_condition.RunCondition getRunCondition()
-
getProjectActions
public Collection getProjectActions(AbstractProject<?,?> project)
- Specified by:
getProjectActions
in interfaceBuildStep
- Overrides:
getProjectActions
in classBuildStepCompatibilityLayer
-
setConditionalbuilders
@Deprecated public void setConditionalbuilders(List<BuildStep> conditionalbuilders)
Deprecated.No longer needed as part of the DataBoundConstructorSet the Conditional Builders
-
prebuild
public boolean prebuild(AbstractBuild<?,?> build, BuildListener listener)
- Specified by:
prebuild
in interfaceBuildStep
- Overrides:
prebuild
in classBuildStepCompatibilityLayer
-
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
-
readResolve
public Object readResolve()
-
getDescriptor
public ConditionalBuilder.DescriptorImpl getDescriptor()
- Specified by:
getDescriptor
in interfaceDescribable<Builder>
- Overrides:
getDescriptor
in classBuilder
-
buildDependencyGraph
public void buildDependencyGraph(AbstractProject project, DependencyGraph graph)
- Specified by:
buildDependencyGraph
in interfaceDependencyDeclarer
-
-