hudson.model.AbstractBuild.setResult()方法的使用及代码示例

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

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

AbstractBuild.setResult介绍

暂无

代码示例

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

@Override public boolean checkout(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException {
  try {
    resolve().restoreTo(workspace,listener);
    return true;
  } catch (ResolvedFailedException e) {
    listener.error(e.getMessage()); // stack trace is meaningless
    build.setResult(Result.FAILURE);
    return false;
  }
}

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

build.setResult(Result.UNSTABLE);
r = 0;

代码示例来源:origin: org.jvnet.hudson.plugins/groovy-postbuild

public void buildUnstable() {
  build.setResult(Result.UNSTABLE);
}
public void buildFailure() {

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

public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
  listener.getLogger().println("Simulating a specific result code "+result);
  build.setResult(result);
  return true;
}

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

public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
  listener.getLogger().println("Simulating an unstable build");
  build.setResult(Result.UNSTABLE);
  return true;
}

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

public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
  listener.getLogger().println("Simulating a failure");
  build.setResult(Result.FAILURE);
  return false;
}

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

public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
  listener.getLogger().println("Simulating a specific result code " + result);
  build.setResult(result);
  return true;
}

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

public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
  listener.getLogger().println("Simulating an unstable build");
  build.setResult(Result.UNSTABLE);
  return true;
}

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

public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
  listener.getLogger().println("Simulating a failure");
  build.setResult(Result.FAILURE);
  return false;
}

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

public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
  listener.getLogger().println("Simulating an unstable build");
  build.setResult(Result.UNSTABLE);
  return true;
}

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

public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
  listener.getLogger().println("Simulating a specific result code "+result);
  build.setResult(result);
  return true;
}

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

public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
  listener.getLogger().println("Simulating a failure");
  build.setResult(Result.FAILURE);
  return false;
}

代码示例来源:origin: org.hudsonci.plugins/run-condition

private static void setResult(final AbstractBuild<?, ?> build, final Result result) {
  if (build.getResult() == null)
    build.setResult(result);
  else
    build.setResult(result.combine(build.getResult()));
}

代码示例来源:origin: org.jvnet.hudson.plugins/deploy

@Override
public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
  if (build.getResult().equals(Result.SUCCESS) || onFailure) {
      for (FilePath warFile : build.getWorkspace().list(this.war)) {
      if(!adapter.redeploy(warFile,build,launcher,listener))
        build.setResult(Result.FAILURE);
    }
  }
  return true;
}

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

@Override public boolean checkout(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException {
  try {
    resolve().restoreTo(workspace,listener);
    return true;
  } catch (ResolvedFailedException e) {
    listener.error(e.getMessage()); // stack trace is meaningless
    build.setResult(Result.FAILURE);
    return false;
  }
}

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

public boolean checkout(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException {
  try {
    resolve().restoreTo(workspace, listener);
    return true;
  } catch (ResolvedFailedException e) {
    listener.error(e.getMessage()); // stack trace is meaningless
    build.setResult(Result.FAILURE);
    return false;
  }
}

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

public boolean checkout(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException {
  try {
    resolve().restoreTo(workspace,listener);
    return true;
  } catch (ResolvedFailedException e) {
    listener.error(e.getMessage()); // stack trace is meaningless
    build.setResult(Result.FAILURE);
    return false;
  }
}

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

public boolean checkout(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException {
  try {
    resolve().restoreTo(workspace,listener);
    return true;
  } catch (ResolvedFailedException e) {
    listener.error(e.getMessage()); // stack trace is meaningless
    build.setResult(Result.FAILURE);
    return false;
  }
}

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

public boolean checkout(AbstractBuild build, Launcher launcher, FilePath workspace, BuildListener listener, File changelogFile) throws IOException, InterruptedException {
  try {
    resolve().restoreTo(workspace,listener);
    return true;
  } catch (ResolvedFailedException e) {
    listener.error(e.getMessage()); // stack trace is meaningless
    build.setResult(Result.FAILURE);
    return false;
  }
}

代码示例来源:origin: org.jvnet.hudson.plugins/jython

public boolean perform(AbstractBuild<?,?> build, Launcher launcher, BuildListener listener)  throws IOException, InterruptedException {
    PySystemState sys = new PySystemState();
    sys.setCurrentWorkingDir(build.getWorkspace().getRemote());
    PythonInterpreter interp = new PythonInterpreter(null, sys);

    interp.setOut(listener.getLogger());
    interp.setErr(listener.getLogger());
    interp.exec(this.getCommand());
    interp.cleanup();

    build.setResult(Result.SUCCESS);
    return true;
  }
}

相关文章

微信公众号

最新文章

更多

AbstractBuild类方法