Package jenkins.triggers
Class ReverseBuildTrigger
- All Implemented Interfaces:
ExtensionPoint
,Describable<Trigger<?>>
,DependencyDeclarer
Like
BuildTrigger
but defined on the downstream project.
Operates via BuildTrigger.execute(hudson.model.AbstractBuild, hudson.model.BuildListener, hudson.tasks.BuildTrigger)
and DependencyGraph
,
so run implicitly at the end of the upstream build,
when used on a pair of AbstractProject
s.
Otherwise directly listens for the upstream build to complete.- Since:
- 1.560
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static class
static final class
Nested classes/interfaces inherited from class hudson.triggers.Trigger
Trigger.Cron
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Field Summary
-
Constructor Summary
ConstructorDescriptionReverseBuildTrigger
(String upstreamProjects) ReverseBuildTrigger
(String upstreamProjects, Result threshold) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoid
buildDependencyGraph
(AbstractProject downstream, DependencyGraph graph) Invoked fromAbstractProject.buildDependencyGraph(DependencyGraph)
.Gets the upstream projects.void
void
Called when aTrigger
is loaded into memory and started.void
stop()
Called before aTrigger
is removed.Methods inherited from class hudson.triggers.Trigger
all, checkTriggers, for_, getDescriptor, getProjectAction, getProjectActions, getSpec, readResolve, run, toString
-
Constructor Details
-
ReverseBuildTrigger
Deprecated.Legacy constructor used beforethreshold
was moved to a@DataBoundSetter
. Kept around for binary compatibility. -
ReverseBuildTrigger
-
-
Method Details
-
getUpstreamProjects
Gets the upstream projects.- Returns:
- Upstream projects or empty("") if upstream projects is null.
-
getThreshold
-
setThreshold
-
buildDependencyGraph
Description copied from interface:DependencyDeclarer
Invoked fromAbstractProject.buildDependencyGraph(DependencyGraph)
.- Specified by:
buildDependencyGraph
in interfaceDependencyDeclarer
- Parameters:
downstream
- The project that owns the publishers, builders, etc. This information is conceptually redundant, as those objects are only configured against the single owner, but this information is nevertheless passed in since often owner information is not recorded. Never null.graph
- The dependency graph being built. Never null.
-
start
Description copied from class:Trigger
Called when aTrigger
is loaded into memory and started.- Overrides:
start
in classTrigger<Job>
- Parameters:
project
- given so that the persisted form of this object won't have to have a back pointer.newInstance
- True if this may be a newly created trigger first attached to theProject
(generally if the project is being created or configured). False if this is invoked for aProject
loaded from disk.- See Also:
-
stop
public void stop()Description copied from class:Trigger
-
ReverseBuildTrigger(String)
andsetThreshold(Result)