本文整理了Java中hudson.model.AbstractBuild.setDisplayName()
方法的一些代码示例,展示了AbstractBuild.setDisplayName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractBuild.setDisplayName()
方法的具体详情如下:
包路径:hudson.model.AbstractBuild
类名称: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);
}
}
内容来源于网络,如有侵权,请联系作者删除!