本文整理了Java中hudson.model.Job.getFirstBuild()
方法的一些代码示例,展示了Job.getFirstBuild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Job.getFirstBuild()
方法的具体详情如下:
包路径:hudson.model.Job
类名称:Job
方法名:getFirstBuild
[英]Returns the oldest build in the record.
[中]返回记录中最早的生成。
代码示例来源:origin: jenkinsci/jenkins
/**
* Returns true if any of the builds recorded in this fingerprint
* is still retained.
*
* <p>
* This is used to find out old fingerprint records that can be removed
* without losing too much information.
*/
public synchronized boolean isAlive() {
if(original!=null && original.isAlive())
return true;
for (Entry<String,RangeSet> e : usages.entrySet()) {
Job j = Jenkins.getInstance().getItemByFullName(e.getKey(),Job.class);
if(j==null)
continue;
Run firstBuild = j.getFirstBuild();
if(firstBuild==null)
continue;
int oldest = firstBuild.getNumber();
if(!e.getValue().isSmallerThan(oldest))
return true;
}
return false;
}
代码示例来源:origin: jenkinsci/jenkins
Calendar cal = new GregorianCalendar();
cal.add(Calendar.DAY_OF_YEAR,-daysToKeep);
Run r = job.getFirstBuild();
while (r != null) {
if (tooNew(r, cal)) {
Calendar cal = new GregorianCalendar();
cal.add(Calendar.DAY_OF_YEAR,-artifactDaysToKeep);
Run r = job.getFirstBuild();
while (r != null) {
if (tooNew(r, cal)) {
代码示例来源:origin: jenkinsci/jenkins
Run firstBuild = j.getFirstBuild();
if(firstBuild==null) {// no builds. recycle the whole record
modified = true;
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
public RunT superGetFirstBuild() {
return super.getFirstBuild();
}
代码示例来源:origin: com.marvelution.jira.plugins/hudson-apiv2-plugin
/**
* {@inheritDoc}
*/
@Override
public Build getFirstBuild(String jobName) {
hudson.model.Job<?, ?> job = getHudsonJob(jobName);
if (job.getFirstBuild() != null) {
log.fine("Mapping the first build of job " + job.getFullName());
return DozerUtils.getMapper().map(job.getFirstBuild(), Build.class);
}
throw new NoSuchBuildException(jobName, "First");
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Returns true if any of the builds recorded in this fingerprint
* is still retained.
*
* <p>
* This is used to find out old fingerprint records that can be removed
* without losing too much information.
*/
public synchronized boolean isAlive() {
if(original!=null && original.isAlive())
return true;
for (Entry<String,RangeSet> e : usages.entrySet()) {
Job j = Hudson.getInstance().getItemByFullName(e.getKey(),Job.class);
if(j==null)
continue;
int oldest = j.getFirstBuild().getNumber();
if(!e.getValue().isSmallerThan(oldest))
return true;
}
return false;
}
代码示例来源:origin: jenkinsci/multi-branch-project-plugin
/**
* Returns the oldest build in the record.
*
* @return the build or null
*/
@SuppressWarnings(UNUSED)
@CheckForNull
@Exported
public Run getFirstBuild() {
Run retVal = null;
for (Job job : getAllJobs()) {
Run run = job.getFirstBuild();
if (run != null && (retVal == null || run.getTimestamp().before(retVal.getTimestamp()))) {
retVal = run;
}
}
return retVal;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Returns true if any of the builds recorded in this fingerprint
* is still retained.
*
* <p>
* This is used to find out old fingerprint records that can be removed
* without losing too much information.
*/
public synchronized boolean isAlive() {
if(original!=null && original.isAlive())
return true;
for (Entry<String,RangeSet> e : usages.entrySet()) {
Job j = Hudson.getInstance().getItemByFullName(e.getKey(),Job.class);
if(j==null)
continue;
int oldest = j.getFirstBuild().getNumber();
if(!e.getValue().isSmallerThan(oldest))
return true;
}
return false;
}
代码示例来源:origin: org.hudsonci.plugins/claim
public Run getFirstFail(Run r) {
Run lastGood = r.getPreviousNotFailedBuild();
Run firstFail;
if (lastGood == null) {
firstFail = r.getParent().getFirstBuild();
} else {
firstFail = lastGood.getNextBuild();
}
return firstFail;
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Returns true if any of the builds recorded in this fingerprint
* is still retained.
*
* <p>
* This is used to find out old fingerprint records that can be removed
* without losing too much information.
*/
public synchronized boolean isAlive() {
if(original!=null && original.isAlive())
return true;
for (Entry<String,RangeSet> e : usages.entrySet()) {
Job j = Hudson.getInstance().getItemByFullName(e.getKey(),Job.class);
if(j==null)
continue;
int oldest = j.getFirstBuild().getNumber();
if(!e.getValue().isSmallerThan(oldest))
return true;
}
return false;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Returns true if any of the builds recorded in this fingerprint is still
* retained.
*
* <p> This is used to find out old fingerprint records that can be removed
* without losing too much information.
*/
public synchronized boolean isAlive() {
if (original != null && original.isAlive()) {
return true;
}
for (Entry<String, RangeSet> e : usages.entrySet()) {
Job j = Hudson.getInstance().getItemByFullName(e.getKey(), Job.class);
if (j == null) {
continue;
}
int oldest = j.getFirstBuild().getNumber();
if (!e.getValue().isSmallerThan(oldest)) {
return true;
}
}
return false;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Returns true if any of the builds recorded in this fingerprint
* is still retained.
*
* <p>
* This is used to find out old fingerprint records that can be removed
* without losing too much information.
*/
public synchronized boolean isAlive() {
if(original!=null && original.isAlive())
return true;
for (Entry<String,RangeSet> e : usages.entrySet()) {
Job j = Jenkins.getInstance().getItemByFullName(e.getKey(),Job.class);
if(j==null)
continue;
Run firstBuild = j.getFirstBuild();
if(firstBuild==null)
continue;
int oldest = firstBuild.getNumber();
if(!e.getValue().isSmallerThan(oldest))
return true;
}
return false;
}
代码示例来源:origin: jenkinsci/embeddable-build-status-plugin
private Run findSpecific(Job job, Run run, String what, String specific) {
if (run == null) {
if (what.equals("first")) {
run = findSpecific(job, job.getFirstBuild(), what, specific);
} else {
if (specific != null) {
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
@Override
@Exported
@QuickSilver
public RunT getFirstBuild() {
initPython();
if (pexec.isImplemented(50)) {
return (RunT) pexec.execPython("get_first_build");
} else {
return super.getFirstBuild();
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
Calendar cal = new GregorianCalendar();
cal.add(Calendar.DAY_OF_YEAR,-daysToKeep);
Run r = job.getFirstBuild();
while (r != null) {
if (tooNew(r, cal)) {
Calendar cal = new GregorianCalendar();
cal.add(Calendar.DAY_OF_YEAR,-artifactDaysToKeep);
Run r = job.getFirstBuild();
while (r != null) {
if (tooNew(r, cal)) {
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
Run firstBuild = j.getFirstBuild();
if(firstBuild==null) {// no builds. recycle the whole record
modified = true;
代码示例来源:origin: org.jvnet.hudson.plugins/dashboard-view
Run run = job.getFirstBuild();
内容来源于网络,如有侵权,请联系作者删除!