本文整理了Java中hudson.model.AbstractProject.isBuilding()
方法的一些代码示例,展示了AbstractProject.isBuilding()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractProject.isBuilding()
方法的具体详情如下:
包路径:hudson.model.AbstractProject
类名称:AbstractProject
方法名:isBuilding
暂无
代码示例来源:origin: jenkinsci/jenkins
@Override
public BallColor getIconColor() {
if(isDisabled())
return isBuilding() ? BallColor.DISABLED_ANIME : BallColor.DISABLED;
else
return super.getIconColor();
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Returns the project if any of the upstream project is either
* building or is in the queue.
* <p>
* This means eventually there will be an automatic triggering of
* the given project (provided that all builds went smoothly.)
*/
public AbstractProject getBuildingUpstream() {
Set<Task> unblockedTasks = Jenkins.getInstance().getQueue().getUnblockedTasks();
for (AbstractProject tup : getTransitiveUpstreamProjects()) {
if (tup!=this && (tup.isBuilding() || unblockedTasks.contains(tup)))
return tup;
}
return null;
}
代码示例来源: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.jenkins-ci.main/jenkins-core
@Override
public BallColor getIconColor() {
if(isDisabled())
return isBuilding() ? BallColor.DISABLED_ANIME : BallColor.DISABLED;
else
return super.getIconColor();
}
代码示例来源:origin: org.jvnet.hudson.main/maven3-plugin
@JellyAccessible
public boolean isBuilding() {
return getProject().isBuilding();
}
代码示例来源: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;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Returns the project if any of the upstream 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 getBuildingUpstream() {
Set<Task> unblockedTasks = Hudson.getInstance().getQueue().getUnblockedTasks();
for (AbstractProject tup : getTransitiveUpstreamProjects()) {
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 upstream project is either
* building or is in the queue.
* <p>
* This means eventually there will be an automatic triggering of
* the given project (provided that all builds went smoothly.)
*/
public AbstractProject getBuildingUpstream() {
Set<Task> unblockedTasks = Jenkins.getInstance().getQueue().getUnblockedTasks();
for (AbstractProject tup : getTransitiveUpstreamProjects()) {
if (tup!=this && (tup.isBuilding() || unblockedTasks.contains(tup)))
return tup;
}
return null;
}
代码示例来源:origin: org.jvnet.hudson.main/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.)
*/
protected AbstractProject getBuildingDownstream() {
DependencyGraph graph = Hudson.getInstance().getDependencyGraph();
Set<AbstractProject> tups = graph.getTransitiveDownstream(this);
tups.add(this);
for (AbstractProject tup : tups) {
if(tup!=this && (tup.isBuilding() || tup.isInUnblockedQueue()))
return tup;
}
return null;
}
代码示例来源:origin: hudson/hudson-2.x
/**
* 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.)
*/
protected AbstractProject getBuildingDownstream() {
DependencyGraph graph = Hudson.getInstance().getDependencyGraph();
Set<AbstractProject> tups = graph.getTransitiveDownstream(this);
tups.add(this);
for (AbstractProject tup : tups) {
if(tup!=this && (tup.isBuilding() || tup.isInUnblockedQueue()))
return tup;
}
return null;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Returns the project if any of the upstream 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.)
*/
protected AbstractProject getBuildingUpstream() {
DependencyGraph graph = Hudson.getInstance().getDependencyGraph();
Set<AbstractProject> tups = graph.getTransitiveUpstream(this);
tups.add(this);
for (AbstractProject tup : tups) {
if(tup!=this && (tup.isBuilding() || tup.isInUnblockedQueue()))
return tup;
}
return null;
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Returns the project if any of the upstream 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.)
*/
protected AbstractProject getBuildingUpstream() {
DependencyGraph graph = Hudson.getInstance().getDependencyGraph();
Set<AbstractProject> tups = graph.getTransitiveUpstream(this);
tups.add(this);
for (AbstractProject tup : tups) {
if (tup != this && (tup.isBuilding() || tup.isInUnblockedQueue())) {
return tup;
}
}
return null;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Returns jobs that running on current computer.
*
* @return List<AbstractProject>.
*/
@Exported
public List<AbstractProject> getRunningJobs() {
List<AbstractProject> jobs = new ArrayList<AbstractProject>();
Queue queue = Hudson.getInstance().getQueue();
if (getTiedJobs() != null) {
for (AbstractProject project : getTiedJobs()) {
if (project.isBuilding() || queue.contains(project)) {
jobs.add(project);
}
}
}
return jobs;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Returns jobs that running on current computer.
* @return List<AbstractProject>.
*/
@Exported
public List<AbstractProject> getRunningJobs() {
List<AbstractProject> jobs = new ArrayList<AbstractProject>();
Queue queue = Hudson.getInstance().getQueue();
if (getTiedJobs() != null) {
for (AbstractProject project : getTiedJobs()) {
if (project.isBuilding() || queue.contains(project)) {
jobs.add(project);
}
}
}
return jobs;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
public CauseOfBlockage getCauseOfBlockage() {
if (isBuilding() && !isConcurrentBuild())
return new BecauseOfBuildInProgress(getLastBuild());
if (blockBuildWhenDownstreamBuilding()) {
AbstractProject<?,?> bup = getBuildingDownstream();
if (bup!=null)
return new BecauseOfDownstreamBuildInProgress(bup);
}
if (blockBuildWhenUpstreamBuilding()) {
AbstractProject<?,?> bup = getBuildingUpstream();
if (bup!=null)
return new BecauseOfUpstreamBuildInProgress(bup);
}
return null;
}
代码示例来源:origin: org.jvnet.hudson.plugins/ivy
@Override
public CauseOfBlockage getCauseOfBlockage() {
CauseOfBlockage cob = super.getCauseOfBlockage();
if (cob != null)
return cob;
if (!getParent().isAggregatorStyleBuild()) {
DependencyGraph graph = Hudson.getInstance().getDependencyGraph();
for (AbstractProject tup : graph.getTransitiveUpstream(this)) {
if(getParent() == tup.getParent() && (tup.isBuilding() || tup.isInQueue()))
return new BecauseOfUpstreamModuleBuildInProgress(tup);
}
}
return null;
}
代码示例来源:origin: hudson/hudson-2.x
public CauseOfBlockage getCauseOfBlockage() {
if (isBuilding() && !isConcurrentBuild())
return new BecauseOfBuildInProgress(getLastBuild());
if (blockBuildWhenDownstreamBuilding()) {
AbstractProject<?,?> bup = getBuildingDownstream();
if (bup!=null)
return new BecauseOfDownstreamBuildInProgress(bup);
}
if (blockBuildWhenUpstreamBuilding()) {
AbstractProject<?,?> bup = getBuildingUpstream();
if (bup!=null)
return new BecauseOfUpstreamBuildInProgress(bup);
}
return null;
}
代码示例来源:origin: org.jenkins-ci.plugins/ivy
@Override
public CauseOfBlockage getCauseOfBlockage() {
CauseOfBlockage cob = super.getCauseOfBlockage();
if (cob != null)
return cob;
if (!getParent().isAggregatorStyleBuild()) {
DependencyGraph graph = Hudson.getInstance().getDependencyGraph();
for (AbstractProject tup : graph.getTransitiveUpstream(this)) {
if(getParent() == tup.getParent() && (tup.isBuilding() || tup.isInQueue()))
return new BecauseOfUpstreamModuleBuildInProgress(tup);
}
}
return null;
}
代码示例来源:origin: org.hudsonci.plugins/ivy
@Override
public CauseOfBlockage getCauseOfBlockage() {
CauseOfBlockage cob = super.getCauseOfBlockage();
if (cob != null)
return cob;
if (!getParent().isAggregatorStyleBuild()) {
DependencyGraph graph = Hudson.getInstance().getDependencyGraph();
for (AbstractProject tup : graph.getTransitiveUpstream(this)) {
if(getParent() == tup.getParent() && (tup.isBuilding() || tup.isInQueue()))
return new BecauseOfUpstreamModuleBuildInProgress(tup);
}
}
return null;
}
内容来源于网络,如有侵权,请联系作者删除!