public final class ReverseBuildTrigger extends Trigger<Job> implements DependencyDeclarer
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.Modifier and Type | Class and Description |
---|---|
static class |
ReverseBuildTrigger.DescriptorImpl |
static class |
ReverseBuildTrigger.ItemListenerImpl |
static class |
ReverseBuildTrigger.RunListenerImpl |
Trigger.Cron
ExtensionPoint.LegacyInstancesAreScopedToHudson
Constructor and Description |
---|
ReverseBuildTrigger(String upstreamProjects) |
ReverseBuildTrigger(String upstreamProjects,
Result threshold)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
buildDependencyGraph(AbstractProject downstream,
DependencyGraph graph)
Invoked from
AbstractProject.buildDependencyGraph(DependencyGraph) . |
Result |
getThreshold() |
String |
getUpstreamProjects()
Gets the upstream projects.
|
void |
setThreshold(Result r) |
void |
start(Job project,
boolean newInstance)
Called when a
Trigger is loaded into memory and started. |
void |
stop()
Called before a
Trigger is removed. |
all, checkTriggers, for_, getDescriptor, getProjectAction, getProjectActions, getSpec, readResolve, run
@Deprecated public ReverseBuildTrigger(String upstreamProjects, Result threshold)
ReverseBuildTrigger(String)
and setThreshold(Result)
threshold
was moved to a @DataBoundSetter
. Kept around for binary
compatibility.@DataBoundConstructor public ReverseBuildTrigger(String upstreamProjects)
public String getUpstreamProjects()
public Result getThreshold()
@DataBoundSetter public void setThreshold(Result r)
public void buildDependencyGraph(AbstractProject downstream, DependencyGraph graph)
DependencyDeclarer
AbstractProject.buildDependencyGraph(DependencyGraph)
.buildDependencyGraph
in interface DependencyDeclarer
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.public void start(@NonNull Job project, boolean newInstance)
Trigger
Trigger
is loaded into memory and started.start
in class Trigger<Job>
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 the Project
(generally if the project is being created or configured).
False if this is invoked for a Project
loaded from disk.Items.currentlyUpdatingByXml()
public void stop()
Trigger
Copyright © 2004–2022. All rights reserved.