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 AbstractProjects.
Otherwise directly listens for the upstream build to complete.- Since:
- 1.560
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic classstatic final classNested classes/interfaces inherited from class hudson.triggers.Trigger
Trigger.CronNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionReverseBuildTrigger(String upstreamProjects) ReverseBuildTrigger(String upstreamProjects, Result threshold) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionvoidbuildDependencyGraph(AbstractProject downstream, DependencyGraph graph) Invoked fromAbstractProject.buildDependencyGraph(DependencyGraph).Gets the upstream projects.voidvoidCalled when aTriggeris loaded into memory and started.voidstop()Called before aTriggeris 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 beforethresholdwas 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:DependencyDeclarerInvoked fromAbstractProject.buildDependencyGraph(DependencyGraph).- Specified by:
buildDependencyGraphin 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:TriggerCalled when aTriggeris loaded into memory and started.- Overrides:
startin 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 aProjectloaded from disk.- See Also:
-
stop
public void stop()Description copied from class:Trigger
-
ReverseBuildTrigger(String)andsetThreshold(Result)