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

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

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

AbstractProject.isKeepDependencies介绍

暂无

代码示例

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

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?,?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) continue;
    AbstractBuild<?,?> fb = p.getFirstBuild();
    if (fb==null)        continue; // no active record
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i<fb.getNumber())
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      AbstractBuild<?,?> b = p.getBuildByNumber(i);
      if (b!=null)
        return Messages.AbstractBuild_KeptBecause(p.hasPermission(Item.READ) ? b.toString() : "?");
    }
  }
  return super.getWhyKeepLog();
}

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

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?,?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) continue;
    AbstractBuild<?,?> fb = p.getFirstBuild();
    if (fb==null)        continue; // no active record
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i<fb.getNumber())
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      AbstractBuild<?,?> b = p.getBuildByNumber(i);
      if (b!=null)
        return Messages.AbstractBuild_KeptBecause(b);
    }
  }
  return super.getWhyKeepLog();
}

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

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?,?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) continue;
    AbstractBuild<?,?> fb = p.getFirstBuild();
    if (fb==null)        continue; // no active record
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i<fb.getNumber())
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      AbstractBuild<?,?> b = p.getBuildByNumber(i);
      if (b!=null)
        return Messages.AbstractBuild_KeptBecause(b);
    }
  }
  return super.getWhyKeepLog();
}

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

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?,?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) continue;
    AbstractBuild<?,?> fb = p.getFirstBuild();
    if (fb==null)        continue; // no active record
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i<fb.getNumber())
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      AbstractBuild<?,?> b = p.getBuildByNumber(i);
      if (b!=null)
        return Messages.AbstractBuild_KeptBecause(b);
    }
  }
  return super.getWhyKeepLog();
}

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

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?, ?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) {
      continue;
    }
    AbstractBuild<?, ?> fb = p.getFirstBuild();
    if (fb == null) {
      continue; // no active record
    }
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i < fb.getNumber()) {
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      }
      AbstractBuild<?, ?> b = p.getBuildByNumber(i);
      if (b != null) {
        return Messages.AbstractBuild_KeptBecause(b);
      }
    }
  }
  return super.getWhyKeepLog();
}

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

@Override
public String getWhyKeepLog() {
  // if any of the downstream project is configured with 'keep dependency component',
  // we need to keep this log
  OUTER:
  for (AbstractProject<?,?> p : getParent().getDownstreamProjects()) {
    if (!p.isKeepDependencies()) continue;
    AbstractBuild<?,?> fb = p.getFirstBuild();
    if (fb==null)        continue; // no active record
    // is there any active build that depends on us?
    for (int i : getDownstreamRelationship(p).listNumbersReverse()) {
      // TODO: this is essentially a "find intersection between two sparse sequences"
      // and we should be able to do much better.
      if (i<fb.getNumber())
        continue OUTER; // all the other records are younger than the first record, so pointless to search.
      AbstractBuild<?,?> b = p.getBuildByNumber(i);
      if (b!=null)
        return Messages.AbstractBuild_KeptBecause(p.hasPermission(Item.READ) ? b.toString() : "?");
    }
  }
  return super.getWhyKeepLog();
}

相关文章

微信公众号

最新文章

更多

AbstractProject类方法