Package hudson.plugins.downstream_ext
Class DownstreamTrigger
- java.lang.Object
-
- hudson.tasks.BuildStepCompatibilityLayer
-
- hudson.tasks.Publisher
-
- hudson.tasks.Notifier
-
- hudson.plugins.downstream_ext.DownstreamTrigger
-
- All Implemented Interfaces:
ExtensionPoint
,hudson.matrix.MatrixAggregatable
,Describable<Publisher>
,BuildStep
,DependencyDeclarer
public class DownstreamTrigger extends Notifier implements DependencyDeclarer, hudson.matrix.MatrixAggregatable
Triggers builds of other projects. This class was inspired byBuildTrigger
(rev. 21890) - but has changed significantly in the mean time.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DownstreamTrigger.DescriptorImpl
static class
DownstreamTrigger.Strategy
-
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
-
-
Field Summary
-
Fields inherited from interface hudson.tasks.BuildStep
BUILDERS, PUBLISHERS
-
-
Constructor Summary
Constructors Constructor Description DownstreamTrigger(String childProjects, Result threshold, boolean onlyIfSCMChanges, boolean onlyIfLocalSCMChanges, DownstreamTrigger.Strategy strategy, MatrixTrigger matrixTrigger)
DownstreamTrigger(String childProjects, String threshold, boolean onlyIfSCMChanges, boolean onlyIfLocalSCMChanges, String strategy, String matrixTrigger)
-
Method Summary
-
Methods inherited from class hudson.tasks.Notifier
getDescriptor
-
Methods inherited from class hudson.tasks.Publisher
all, getProjectAction, prebuild
-
Methods inherited from class hudson.tasks.BuildStepCompatibilityLayer
getProjectAction, getProjectActions, perform, prebuild
-
-
-
-
Constructor Detail
-
DownstreamTrigger
@DataBoundConstructor public DownstreamTrigger(String childProjects, String threshold, boolean onlyIfSCMChanges, boolean onlyIfLocalSCMChanges, String strategy, String matrixTrigger)
-
DownstreamTrigger
public DownstreamTrigger(String childProjects, Result threshold, boolean onlyIfSCMChanges, boolean onlyIfLocalSCMChanges, DownstreamTrigger.Strategy strategy, MatrixTrigger matrixTrigger)
-
-
Method Detail
-
getChildProjectsValue
public String getChildProjectsValue()
-
getThreshold
public Result getThreshold()
-
isOnlyIfSCMChanges
public boolean isOnlyIfSCMChanges()
-
isOnlyIfLocalSCMChanges
public boolean isOnlyIfLocalSCMChanges()
-
getMatrixTrigger
public MatrixTrigger getMatrixTrigger()
-
getChildProjects
public List<AbstractProject> getChildProjects()
Deprecated.
-
getChildProjects
public List<AbstractProject> getChildProjects(ItemGroup context)
-
getStrategy
public DownstreamTrigger.Strategy getStrategy()
-
getRequiredMonitorService
public BuildStepMonitor getRequiredMonitorService()
- Specified by:
getRequiredMonitorService
in interfaceBuildStep
-
perform
public boolean perform(AbstractBuild build, Launcher launcher, BuildListener listener)
- Specified by:
perform
in interfaceBuildStep
- Overrides:
perform
in classBuildStepCompatibilityLayer
-
buildDependencyGraph
public void buildDependencyGraph(AbstractProject owner, DependencyGraph graph)
- Specified by:
buildDependencyGraph
in interfaceDependencyDeclarer
-
needsToRunAfterFinalized
public boolean needsToRunAfterFinalized()
- Overrides:
needsToRunAfterFinalized
in classPublisher
-
onJobRenamed
public boolean onJobRenamed(String oldName, String newName)
Called fromDownstreamTrigger.DescriptorImpl.ItemListenerImpl
when a job is renamed.- Returns:
- true
if this
DownstreamTrigger
is changed and needs to be saved.
-
executeForProject
public static void executeForProject(AbstractProject<?,?> project, Runnable run)
-
createAggregator
public hudson.matrix.MatrixAggregator createAggregator(hudson.matrix.MatrixBuild build, Launcher launcher, BuildListener listener)
This method is invoked only by matrix projects and is used to allow a matrix job to fire a downstream job only when it ends, instead of starting them for every matrix configuration.- Specified by:
createAggregator
in interfacehudson.matrix.MatrixAggregatable
-
-