private void postFailureBuild(SRunningBuild build )
{
String message = "";
PeriodFormatter durationFormatter = new PeriodFormatterBuilder()
.printZeroRarelyFirst()
.appendHours()
.appendSuffix(" hour", " hours")
.appendSeparator(" ")
.printZeroRarelyLast()
.appendMinutes()
.appendSuffix(" minute", " minutes")
.appendSeparator(" and ")
.appendSeconds()
.appendSuffix(" second", " seconds")
.toFormatter();
Duration buildDuration = new Duration(1000*build.getDuration());
message = String.format("Project '%s' build failed! ( %s )" , build.getFullName() , durationFormatter.print(buildDuration.toPeriod()));
postToSlack(build, message, false);
}
SlackServerAdapter.java 文件源码
java
阅读 25
收藏 0
点赞 0
评论 0
项目:TCSlackNotifierPlugin
作者:
评论列表
文章目录