hudson.model.Job.getLastFailedBuild()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(3.7k)|赞(0)|评价(0)|浏览(107)

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

Job.getLastFailedBuild介绍

[英]Returns the last failed build, if any. Otherwise null.
[中]返回上次失败的生成(如果有)。否则为空。

代码示例

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

int totalCount = 0;
RunT i = getLastBuild();
RunT u = getLastFailedBuild();
if (i != null && u == null) {

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

public Run<?,?> resolve(Job<?,?> job) {
    return job.getLastFailedBuild();
  }
});

代码示例来源:origin: jenkinsci/build-failure-analyzer-plugin

/**
   * @param project a project.
   * @return the build of the given project based on this StringBuildId.
   *
   * @see StringBuildId#getBuild(hudson.model.Job)
   */
  @Override
  public Run getBuild(Job<? extends Job<?, ?>,
      ? extends Run<?, ?>> project) {
    return project.getLastFailedBuild();
  }
},

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

public Run<?,?> resolve(Job<?,?> job) {
    return job.getLastFailedBuild();
  }
});

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

public Run<?,?> resolve(Job<?,?> job) {
    return job.getLastFailedBuild();
  }
});

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

public Run<?, ?> resolve(Job<?, ?> job) {
    return job.getLastFailedBuild();
  }
});

代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper

public RunT superGetLastFailedBuild() {
  return super.getLastFailedBuild();
}

代码示例来源:origin: com.marvelution.jira.plugins/hudson-apiv2-plugin

/**
 * {@inheritDoc}
 */
@Override
public Build getLastFailedBuild(String jobName) {
  hudson.model.Job<?, ?> job = getHudsonJob(jobName);
  if (job.getLastFailedBuild() != null) {
    log.fine("Mapping the last failed build of job " + job.getFullName());
    return DozerUtils.getMapper().map(job.getLastFailedBuild(), Build.class);
  }
  throw new NoSuchBuildException(jobName, "Last Failed");
}

代码示例来源:origin: jenkinsci/multi-branch-project-plugin

/**
 * Returns the last failed build, if any. Otherwise null.
 *
 * @return the build or null
 */
@SuppressWarnings(UNUSED)
@CheckForNull
@Exported
public Run getLastFailedBuild() {
  Run retVal = null;
  for (Job job : getAllJobs()) {
    retVal = takeLast(retVal, job.getLastFailedBuild());
  }
  return retVal;
}

代码示例来源:origin: jenkinsci/build-failure-analyzer-plugin

/**
 * Set the URL of the last failed build of the project from whose page the Failure Cause Management
 * page was entered.
 */
public void setLastFailedBuildUrl() {
  StaplerRequest staplerRequest = Stapler.getCurrentRequest();
  if (staplerRequest != null) {
    Job project = staplerRequest.findAncestorObject(Job.class);
    if (project != null && project.getLastFailedBuild() != null) {
      staplerRequest.getSession(true).setAttribute(LAST_FAILED_BUILD_URL_SESSION_ATTRIBUTE_NAME,
          Hudson.getInstance().getRootUrl() + project.getLastFailedBuild().getUrl());
    } else {
      staplerRequest.getSession(true).setAttribute(LAST_FAILED_BUILD_URL_SESSION_ATTRIBUTE_NAME, "");
    }
  }
}

代码示例来源:origin: jenkinsci/embeddable-build-status-plugin

if (specific != null) {
  if (specific.equals("Failed")) {
    run = job.getLastFailedBuild();
  } else if (specific.equals("Successful")) {
    run = job.getLastSuccessfulBuild();

代码示例来源:origin: jenkinsci/embeddable-build-status-plugin

run = project.getLastBuild();
} else if (build.equals("lastFailed")) {
  run = project.getLastFailedBuild();                           
} else if (build.equals("lastSuccessful")) {
  run = project.getLastSuccessfulBuild();

代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper

@Override
@Exported
@QuickSilver
public RunT getLastFailedBuild() {
  initPython();
  if (pexec.isImplemented(55)) {
    return (RunT) pexec.execPython("get_last_failed_build");
  } else {
    return super.getLastFailedBuild();
  }
}

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

int totalCount = 0;
RunT i = getLastBuild();
RunT u = getLastFailedBuild();
if (i != null && u == null) {

相关文章

微信公众号

最新文章

更多

Job类方法