hudson.model.AbstractProject.getTransitiveDownstreamProjects()方法的使用及代码示例

x33g5p2x  于2022-01-15 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(82)

本文整理了Java中hudson.model.AbstractProject.getTransitiveDownstreamProjects()方法的一些代码示例,展示了AbstractProject.getTransitiveDownstreamProjects()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractProject.getTransitiveDownstreamProjects()方法的具体详情如下:
包路径:hudson.model.AbstractProject
类名称:AbstractProject
方法名:getTransitiveDownstreamProjects

AbstractProject.getTransitiveDownstreamProjects介绍

[英]Gets all the downstream projects including transitive downstream projects.
[中]获取所有下游项目,包括可传递的下游项目。

代码示例

代码示例来源:origin: jenkinsci/jenkins

/**
 * Returns the project if any of the downstream project is either
 * building, waiting, pending or buildable.
 * <p>
 * This means eventually there will be an automatic triggering of
 * the given project (provided that all builds went smoothly.)
 */
public AbstractProject getBuildingDownstream() {
  Set<Task> unblockedTasks = Jenkins.getInstance().getQueue().getUnblockedTasks();
  for (AbstractProject tup : getTransitiveDownstreamProjects()) {
    if (tup!=this && (tup.isBuilding() || unblockedTasks.contains(tup)))
      return tup;
  }
  return null;
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

public TestResultAction(String jobs, AbstractBuild<?,?> owner) {
  super(owner);
  if(jobs==null) {
    // resolve null as the transitive downstream jobs
    StringBuilder buf = new StringBuilder();
    for (AbstractProject p : getProject().getTransitiveDownstreamProjects()) {
      if(buf.length()>0)  buf.append(',');
      buf.append(p.getFullName());
    }
    jobs = buf.toString();
  }
  this.jobs = jobs;
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

public TestResultAction(String jobs, AbstractBuild<?,?> owner) {
  super(owner);
  if(jobs==null) {
    // resolve null as the transitive downstream jobs
    StringBuilder buf = new StringBuilder();
    for (AbstractProject p : getProject().getTransitiveDownstreamProjects()) {
      if(buf.length()>0)  buf.append(',');
      buf.append(p.getFullName());
    }
    jobs = buf.toString();
  }
  this.jobs = jobs;
}

代码示例来源:origin: hudson/hudson-2.x

public TestResultAction(String jobs, AbstractBuild<?,?> owner) {
  super(owner);
  if(jobs==null) {
    // resolve null as the transitive downstream jobs
    StringBuilder buf = new StringBuilder();
    for (AbstractProject p : getProject().getTransitiveDownstreamProjects()) {
      if(buf.length()>0)  buf.append(',');
      buf.append(p.getFullName());
    }
    jobs = buf.toString();
  }
  this.jobs = jobs;
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

public TestResultAction(String jobs, AbstractBuild<?, ?> owner) {
  super(owner);
  if (jobs == null) {
    // resolve null as the transitive downstream jobs
    StringBuilder buf = new StringBuilder();
    for (AbstractProject p : getProject().getTransitiveDownstreamProjects()) {
      if (buf.length() > 0) {
        buf.append(',');
      }
      buf.append(p.getFullName());
    }
    jobs = buf.toString();
  }
  this.jobs = jobs;
}

代码示例来源:origin: jenkinsci/junit-plugin

@SuppressWarnings("deprecation") // calls getProject in constructor, so needs owner immediately
public TestResultAction(String jobs, boolean includeFailedBuilds, AbstractBuild<?,?> owner) {
  super(owner);
  this.includeFailedBuilds = includeFailedBuilds;
  
  if(jobs==null) {
    // resolve null as the transitive downstream jobs
    StringBuilder buf = new StringBuilder();
    for (AbstractProject p : getProject().getTransitiveDownstreamProjects()) {
      if(buf.length()>0)  buf.append(',');
      buf.append(p.getFullName());
    }
    jobs = buf.toString();
  }
  this.jobs = jobs;
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Returns the project if any of the downstream project (or itself) is
 * either building or is in the unblocked queue. <p> This means eventually
 * there will be an automatic triggering of the given project (provided that
 * all builds went smoothly.)
 */
public AbstractProject getBuildingDownstream() {
  Set<Task> unblockedTasks = Hudson.getInstance().getQueue().getUnblockedTasks();
  for (AbstractProject tup : getTransitiveDownstreamProjects()) {
    if (tup!=this && (tup.isBuilding() || unblockedTasks.contains(tup)))
      return tup;
  }
  return null;
}

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
 * Returns the project if any of the downstream project is either
 * building, waiting, pending or buildable.
 * <p>
 * This means eventually there will be an automatic triggering of
 * the given project (provided that all builds went smoothly.)
 */
public AbstractProject getBuildingDownstream() {
  Set<Task> unblockedTasks = Jenkins.getInstance().getQueue().getUnblockedTasks();
  for (AbstractProject tup : getTransitiveDownstreamProjects()) {
    if (tup!=this && (tup.isBuilding() || unblockedTasks.contains(tup)))
      return tup;
  }
  return null;
}

相关文章

微信公众号

最新文章

更多

AbstractProject类方法