本文整理了Java中hudson.model.AbstractBuild.getNextBuild()
方法的一些代码示例,展示了AbstractBuild.getNextBuild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractBuild.getNextBuild()
方法的具体详情如下:
包路径:hudson.model.AbstractBuild
类名称:AbstractBuild
方法名:getNextBuild
暂无
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the {@link AbstractBuild} objects (fromId,toId].
* <p>
* This method returns all such available builds in the ascending order
* of IDs, but due to log rotations, some builds may be already unavailable.
*/
public List<AbstractBuild> getBuilds() {
List<AbstractBuild> r = new ArrayList<AbstractBuild>();
AbstractBuild<?,?> b = project.getNearestBuild(fromId);
if (b!=null && b.getNumber()==fromId)
b = b.getNextBuild(); // fromId exclusive
while (b!=null && b.getNumber()<=toId) {
r.add(b);
b = b.getNextBuild();
}
return r;
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Gets the {@link AbstractBuild} objects (fromId,toId]. <p> This method
* returns all such available builds in the ascending order of IDs, but
* due to log rotations, some builds may be already unavailable.
*/
public List<AbstractBuild> getBuilds() {
List<AbstractBuild> r = new ArrayList<AbstractBuild>();
AbstractBuild<?, ?> b = (AbstractBuild) project.getNearestBuild(fromId);
if (b != null && b.getNumber() == fromId) {
b = b.getNextBuild(); // fromId exclusive
}
while (b != null && b.getNumber() <= toId) {
r.add(b);
b = b.getNextBuild();
}
return r;
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Gets the {@link AbstractBuild} objects (fromId,toId].
* <p>
* This method returns all such available builds in the ascending order
* of IDs, but due to log rotations, some builds may be already unavailable.
*/
public List<AbstractBuild> getBuilds() {
List<AbstractBuild> r = new ArrayList<AbstractBuild>();
AbstractBuild<?,?> b = project.getNearestBuild(fromId);
if (b!=null && b.getNumber()==fromId)
b = b.getNextBuild(); // fromId exclusive
while (b!=null && b.getNumber()<=toId) {
r.add(b);
b = b.getNextBuild();
}
return r;
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Gets the {@link AbstractBuild} objects (fromId,toId].
* <p>
* This method returns all such available builds in the ascending order
* of IDs, but due to log rotations, some builds may be already unavailable.
*/
public List<AbstractBuild> getBuilds() {
List<AbstractBuild> r = new ArrayList<AbstractBuild>();
AbstractBuild<?,?> b = (AbstractBuild)project.getNearestBuild(fromId);
if (b!=null && b.getNumber()==fromId)
b = b.getNextBuild(); // fromId exclusive
while (b!=null && b.getNumber()<=toId) {
r.add(b);
b = b.getNextBuild();
}
return r;
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Gets the {@link AbstractBuild} objects (fromId,toId].
* <p>
* This method returns all such available builds in the ascending order
* of IDs, but due to log rotations, some builds may be already unavailable.
*/
public List<AbstractBuild> getBuilds() {
List<AbstractBuild> r = new ArrayList<AbstractBuild>();
AbstractBuild<?,?> b = (AbstractBuild)project.getNearestBuild(fromId);
if (b!=null && b.getNumber()==fromId)
b = b.getNextBuild(); // fromId exclusive
while (b!=null && b.getNumber()<=toId) {
r.add(b);
b = b.getNextBuild();
}
return r;
}
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Gets the {@link AbstractBuild} objects (fromId,toId].
* <p>
* This method returns all such available builds in the ascending order
* of IDs, but due to log rotations, some builds may be already unavailable.
*/
public List<AbstractBuild> getBuilds() {
List<AbstractBuild> r = new ArrayList<AbstractBuild>();
AbstractBuild<?,?> b = (AbstractBuild)project.getNearestBuild(fromId);
if (b!=null && b.getNumber()==fromId)
b = b.getNextBuild(); // fromId exclusive
while (b!=null && b.getNumber()<=toId) {
r.add(b);
b = b.getNextBuild();
}
return r;
}
}
代码示例来源:origin: org.hudsonci.plugins/instant-messaging
build = build.getNextBuild();
代码示例来源:origin: jenkinsci/instant-messaging-plugin
build = build.getNextBuild();
代码示例来源:origin: org.hudsonci.plugins/disk-usage
/**
* @return Buidls of nested projects (like MavenModuleBuilds and MatrixRuns)
*/
private static List<AbstractBuild> getChildBuilds(AbstractBuild build) {
List<AbstractBuild> result = new LinkedList<AbstractBuild>();
Job project = build.getParent();
if (project instanceof ItemGroup) {
for (Object child : ((ItemGroup) project).getItems()) {
if (child instanceof AbstractProject) {
AbstractBuild childBuild = (AbstractBuild) ((AbstractProject) child).getNearestBuild(build.getNumber());
AbstractBuild nextBuild = (AbstractBuild) build.getNextBuild();
Integer nextBuildNumber = (nextBuild != null) ? nextBuild.getNumber() : Integer.MAX_VALUE;
while ((childBuild != null) && (childBuild.getNumber() < nextBuildNumber)) {
result.add(childBuild);
childBuild = (AbstractBuild) childBuild.getNextBuild();
}
}
}
}
return result;
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
private void includeCulpritsOf(AbstractProject upstreamProject, AbstractBuild<?, ?> currentBuild, BuildListener listener, Set<InternetAddress> recipientList) throws AddressException {
AbstractBuild<?,?> upstreamBuild = currentBuild.getUpstreamRelationshipBuild(upstreamProject);
AbstractBuild<?,?> previousBuild = currentBuild.getPreviousBuild();
AbstractBuild<?,?> previousBuildUpstreamBuild = previousBuild!=null ? previousBuild.getUpstreamRelationshipBuild(upstreamProject) : null;
if(previousBuild==null && upstreamBuild==null && previousBuildUpstreamBuild==null) {
listener.getLogger().println("Unable to compute the changesets in "+ upstreamProject +". Is the fingerprint configured?");
return;
}
if(previousBuild==null || upstreamBuild==null || previousBuildUpstreamBuild==null) {
listener.getLogger().println("Unable to compute the changesets in "+ upstreamProject);
return;
}
AbstractBuild<?,?> b=previousBuildUpstreamBuild;
do {
recipientList.addAll(buildCulpritList(listener,b.getCulprits()));
b = b.getNextBuild();
} while ( b != upstreamBuild && b != null );
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
private void includeCulpritsOf(AbstractProject upstreamProject, AbstractBuild<?, ?> currentBuild, BuildListener listener, Set<InternetAddress> recipientList) throws AddressException {
AbstractBuild<?, ?> upstreamBuild = currentBuild.getUpstreamRelationshipBuild(upstreamProject);
AbstractBuild<?, ?> previousBuild = currentBuild.getPreviousBuild();
AbstractBuild<?, ?> previousBuildUpstreamBuild = previousBuild != null ? previousBuild.getUpstreamRelationshipBuild(upstreamProject) : null;
if (previousBuild == null && upstreamBuild == null && previousBuildUpstreamBuild == null) {
listener.getLogger().println("Unable to compute the changesets in " + upstreamProject + ". Is the fingerprint configured?");
return;
}
if (previousBuild == null || upstreamBuild == null || previousBuildUpstreamBuild == null) {
listener.getLogger().println("Unable to compute the changesets in " + upstreamProject);
return;
}
AbstractBuild<?, ?> b = previousBuildUpstreamBuild;
do {
recipientList.addAll(buildCulpritList(listener, b.getCulprits()));
b = b.getNextBuild();
} while (b != upstreamBuild && b != null);
}
代码示例来源:origin: hudson/hudson-2.x
private void includeCulpritsOf(AbstractProject upstreamProject, AbstractBuild<?, ?> currentBuild, BuildListener listener, Set<InternetAddress> recipientList) throws AddressException {
AbstractBuild<?,?> upstreamBuild = currentBuild.getUpstreamRelationshipBuild(upstreamProject);
AbstractBuild<?,?> previousBuild = currentBuild.getPreviousBuild();
AbstractBuild<?,?> previousBuildUpstreamBuild = previousBuild!=null ? previousBuild.getUpstreamRelationshipBuild(upstreamProject) : null;
if(previousBuild==null && upstreamBuild==null && previousBuildUpstreamBuild==null) {
listener.getLogger().println("Unable to compute the changesets in "+ upstreamProject +". Is the fingerprint configured?");
return;
}
if(previousBuild==null || upstreamBuild==null || previousBuildUpstreamBuild==null) {
listener.getLogger().println("Unable to compute the changesets in "+ upstreamProject);
return;
}
AbstractBuild<?,?> b=previousBuildUpstreamBuild;
do {
recipientList.addAll(buildCulpritList(listener,b.getCulprits()));
b = b.getNextBuild();
} while ( b != upstreamBuild && b != null );
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
private void includeCulpritsOf(AbstractProject upstreamProject, AbstractBuild<?, ?> currentBuild, BuildListener listener, Set<InternetAddress> recipientList) throws AddressException {
AbstractBuild<?,?> upstreamBuild = currentBuild.getUpstreamRelationshipBuild(upstreamProject);
AbstractBuild<?,?> previousBuild = currentBuild.getPreviousBuild();
AbstractBuild<?,?> previousBuildUpstreamBuild = previousBuild!=null ? previousBuild.getUpstreamRelationshipBuild(upstreamProject) : null;
if(previousBuild==null && upstreamBuild==null && previousBuildUpstreamBuild==null) {
listener.getLogger().println("Unable to compute the changesets in "+ upstreamProject +". Is the fingerprint configured?");
return;
}
if(previousBuild==null || upstreamBuild==null || previousBuildUpstreamBuild==null) {
listener.getLogger().println("Unable to compute the changesets in "+ upstreamProject);
return;
}
AbstractBuild<?,?> b=previousBuildUpstreamBuild;
do {
recipientList.addAll(buildCulpritList(listener,b.getCulprits()));
b = b.getNextBuild();
} while ( b != upstreamBuild && b != null );
}
内容来源于网络,如有侵权,请联系作者删除!