本文整理了Java中hudson.model.AbstractBuild.keepLog()
方法的一些代码示例,展示了AbstractBuild.keepLog()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AbstractBuild.keepLog()
方法的具体详情如下:
包路径:hudson.model.AbstractBuild
类名称:AbstractBuild
方法名:keepLog
暂无
代码示例来源:origin: org.hudsonci.plugins/cvs
protected void perform(TaskListener listener) {
for(Map.Entry<AbstractBuild, String> e : tagSet.entrySet()) {
TagAction ta = e.getKey().getAction(TagAction.class);
if(ta == null) {
listener.error(e.getKey() + " doesn't have CVS tag associated with it. Skipping");
continue;
}
listener.getLogger().println(Messages.CVSSCM_TagginXasY(e.getKey(), e.getValue()));
try {
e.getKey().keepLog();
} catch(IOException x) {
x.printStackTrace(listener.error(Messages.CVSSCM_FailedToMarkForKeep(e.getKey())));
}
ta.perform(e.getValue(), listener);
listener.getLogger().println();
}
}
}
代码示例来源:origin: org.jvnet.hudson.plugins/cvs
protected void perform(TaskListener listener) {
for(Map.Entry<AbstractBuild, String> e : tagSet.entrySet()) {
TagAction ta = e.getKey().getAction(TagAction.class);
if(ta == null) {
listener.error(e.getKey() + " doesn't have CVS tag associated with it. Skipping");
continue;
}
listener.getLogger().println(Messages.CVSSCM_TagginXasY(e.getKey(), e.getValue()));
try {
e.getKey().keepLog();
} catch(IOException x) {
x.printStackTrace(listener.error(Messages.CVSSCM_FailedToMarkForKeep(e.getKey())));
}
ta.perform(e.getValue(), listener);
listener.getLogger().println();
}
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-service
public void keepBuild(final AbstractProject<?, ?> project, final int buildNumber, final boolean release) {
AbstractBuild<?, ?> build = getBuild(project, buildNumber);
this.security.checkPermission(build, Run.UPDATE);
log.debug("{} build: {} #{}", $(release ? "Releasing" : "Keeping", project.getName(), buildNumber));
try {
build.keepLog(!release);
} catch (IOException e) {
throw new ServiceRuntimeException((release ? "Releasing failed for build #" : "Keeping failed for build ")
+ project.getName() + " #" + buildNumber);
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-service
public void keepBuild(final AbstractProject<?, ?> project, final int buildNumber, final boolean release) {
AbstractBuild<?, ?> build = getBuild(project, buildNumber);
this.security.checkPermission(build, Run.UPDATE);
log.debug("{} build: {} #{}", $(release ? "Releasing" : "Keeping", project.getName(), buildNumber));
try {
build.keepLog(!release);
} catch (IOException e) {
throw new ServiceRuntimeException((release ? "Releasing failed for build #" : "Keeping failed for build ")
+ project.getName() + " #" + buildNumber);
}
}
代码示例来源:origin: jenkinsci/promoted-builds-plugin
@Override
public boolean perform(AbstractBuild<?, ?> build, Launcher launcher, BuildListener listener) throws InterruptedException, IOException {
PrintStream console = listener.getLogger();
// only applicable to promotions, so should be impossible not to be one, but check anyway
if (!(build instanceof Promotion)) {
console.println(Messages.KeepBuildForEverAction_console_notPromotion());
build.setResult(Result.FAILURE);
return false;
}
final Result buildResult = build.getResult();
if (buildResult != null && buildResult.isWorseThan(PROMOTION_RESULT_MUST_BE_AT_LEAST)) {
console.println(Messages.KeepBuildForEverAction_console_promotionNotGoodEnough(build.getResult()));
return true;
}
AbstractBuild promoted = ((Promotion) build).getTarget();
console.println(Messages.KeepBuildForEverAction_console_keepingBuild());
promoted.keepLog();
return true;
}
代码示例来源:origin: jenkinsci/m2release-plugin
bld.keepLog();
buildsKept++;
内容来源于网络,如有侵权,请联系作者删除!