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

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

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

AbstractBuild.setDisplayName介绍

暂无

代码示例

代码示例来源:origin: Diabol/delivery-pipeline-plugin

@Override
public Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException,
    InterruptedException {
  try {
    String version = TokenMacro.expandAll(build, listener, getVersionTemplate());
    setVersion(build, version);
    listener.getLogger().println("Creating version: " + version);
    if (isUpdateDisplayName()) {
      build.setDisplayName(version);
    }
  } catch (MacroEvaluationException e) {
    listener.getLogger().println("Error creating version: " + e.getMessage());
    LOG.log(Level.WARNING, "Error creating version", e);
  }
  return new Environment() {
    @Override
    public boolean tearDown(AbstractBuild build, BuildListener listener)
        throws IOException, InterruptedException {
      return true;
    }
  };
}

代码示例来源:origin: jenkinsci/docker-build-publish-plugin

private boolean exec() {
  try {
    if (!isSkipDecorate()) {
      for (ImageTag imageTag : getImageTags()) {
        build.setDisplayName(build.getDisplayName() + " " + imageTag);
      }
    }
    return
      (isSkipBuild() ? maybeTagOnly() : buildAndTag()) &&
      (isSkipPush() || dockerPushCommand());
  } catch (IOException e) {
    return recordException(e);
  } catch (InterruptedException e) {
    return recordException(e);
  } catch (MacroEvaluationException e) {
    return recordException(e);
  }
}

相关文章

微信公众号

最新文章

更多

AbstractBuild类方法