/** * Gets all the upstream projects including transitive upstream projects. * * @since 1.138 */ public final Set<AbstractProject> getTransitiveUpstreamProjects() { return Jenkins.getInstance().getDependencyGraph().getTransitiveUpstream(this); }
/** * Gets the other {@link AbstractProject}s that should be built * when a build of this project is completed. */ public final List<AbstractProject> getDownstreamProjects() { return Jenkins.getInstance().getDependencyGraph().getDownstream(this); }
/** * Gets all the downstream projects including transitive downstream projects. * * @since 1.138 */ public final Set<AbstractProject> getTransitiveDownstreamProjects() { return Jenkins.getInstance().getDependencyGraph().getTransitiveDownstream(this); }
public final List<AbstractProject> getUpstreamProjects() { return Jenkins.getInstance().getDependencyGraph().getUpstream(this); }
final DependencyGraph graph = Jenkins.getInstance().getDependencyGraph(); List<Dependency> downstreamProjects = new ArrayList<Dependency>( graph.getDownstreamDependencies(build.getProject()));
/** * Gets all the upstream projects including transitive upstream projects. * * @since 1.138 */ public final Set<AbstractProject> getTransitiveUpstreamProjects() { return Jenkins.getInstance().getDependencyGraph().getTransitiveUpstream(this); }
/** * Gets the other {@link AbstractProject}s that should be built * when a build of this project is completed. */ public final List<AbstractProject> getDownstreamProjects() { return Jenkins.getInstance().getDependencyGraph().getDownstream(this); }
/** * Gets all the downstream projects including transitive downstream projects. * * @since 1.138 */ public final Set<AbstractProject> getTransitiveDownstreamProjects() { return Jenkins.getInstance().getDependencyGraph().getTransitiveDownstream(this); }
public final List<AbstractProject> getUpstreamProjects() { return Jenkins.getInstance().getDependencyGraph().getUpstream(this); }
private boolean inDownstreamProjects(AbstractProject<?,?> downstreamProject) { DependencyGraph graph = Jenkins.getInstance().getDependencyGraph(); Set<AbstractProject> tups = graph.getTransitiveUpstream(downstreamProject); for (AbstractProject tup : tups) { List<AbstractProject<?,?>> downstreamProjects = getUpstreamProject().getDownstreamProjects(); for (AbstractProject<?,?> dp : downstreamProjects) { if(dp!=getUpstreamProject() && dp!=downstreamProject && dp==tup) return true; } } return false; } }
private boolean areUpstreamsBuilding(AbstractProject<?,?> downstreamProject, AbstractProject<?,?> excludeProject, TaskListener listener) { DependencyGraph graph = Jenkins.getInstance().getDependencyGraph(); Set<AbstractProject> tups = graph.getTransitiveUpstream(downstreamProject); for (AbstractProject tup : tups) {
final DependencyGraph graph = Jenkins.getInstance().getDependencyGraph(); List<Dependency> downstreamProjects = new ArrayList<Dependency>( graph.getDownstreamDependencies(build.getProject()));