Skip to content
Permalink
Browse files
[FIXED JENKINS-22397] Allow a Trigger to be a DependencyDeclarer.
  • Loading branch information
jglick committed Mar 28, 2014
1 parent 606d84c commit efd2b990fbb14de2947dbd405cbfc3c4323d7216
@@ -61,6 +61,9 @@
<li class=bug>
<code>NoSuchMethodError: hudson.model.BuildAuthorizationToken.checkPermission(…)</code> from Build Token Root plugin since 1.556.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-22382">issue 22382</a>)
<li class=rfe>
Allow a <code>Trigger</code> to be a <code>DependencyDeclarer</code>.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-22397">issue 22397</a>)
<li class=bug>
Fixed a slow down in resource loading caused by fix to JENKINS-18677.
(<a href="https://issues.jenkins-ci.org/browse/JENKINS-21579">issue 21579</a>)
@@ -802,7 +802,8 @@ public boolean isFingerprintConfigured() {
return false;
}

protected void buildDependencyGraph(DependencyGraph graph) {
@Override protected void buildDependencyGraph(DependencyGraph graph) {
super.buildDependencyGraph(graph);
publishers.buildDependencyGraph(this,graph);
builders.buildDependencyGraph(this,graph);
buildWrappers.buildDependencyGraph(this,graph);
@@ -1712,9 +1712,11 @@ private void checkAndRecord(AbstractProject that, TreeMap<Integer, RangeSet> r,

/**
* Builds the dependency graph.
* @see DependencyGraph
* Since 1.558, not abstract and by default includes dependencies contributed by {@link #triggers()}.
*/
protected abstract void buildDependencyGraph(DependencyGraph graph);
protected void buildDependencyGraph(DependencyGraph graph) {
triggers().buildDependencyGraph(this, graph);
}

@Override
protected SearchIndexBuilder makeSearchIndex() {
@@ -175,7 +175,8 @@ public Publisher getPublisher(Descriptor<Publisher> descriptor) {
return null;
}

protected void buildDependencyGraph(DependencyGraph graph) {
@Override protected void buildDependencyGraph(DependencyGraph graph) {
super.buildDependencyGraph(graph);
getPublishersList().buildDependencyGraph(this,graph);
getBuildersList().buildDependencyGraph(this,graph);
getBuildWrappersList().buildDependencyGraph(this,graph);
@@ -25,18 +25,20 @@

import hudson.model.AbstractProject;
import hudson.model.DependencyGraph;
import hudson.tasks.BuildStep;
import hudson.tasks.BuildWrapper;
import hudson.tasks.Builder;
import hudson.tasks.Publisher;
import hudson.triggers.Trigger;
import hudson.util.DescribableList;

/**
* Marker interface for those {@link BuildStep}s that can participate
* Marker interface for project-associated objects that can participate
* in the dependency graph computation process.
*
* <p>
* {@link Publisher}s, {@link Builder}s, and {@link hudson.model.JobProperty}s
* can additional implement this method to add additional edges
* to the dependency graph computation.
* {@link Publisher}s, {@link Builder}s, {@link BuildWrapper}s, and {@link Trigger}s
* (or whatever {@link DescribableList#buildDependencyGraph} is called on, by {@link AbstractProject#buildDependencyGraph})
* can implement this interface to add additional edges to the dependency graph.
*
* @author Nicolas Lalevee
* @author Martin Ficker

0 comments on commit efd2b99

Please sign in to comment.