本文整理汇总了Java中hudson.model.Result.isBetterOrEqualTo方法的典型用法代码示例。如果您正苦于以下问题:Java Result.isBetterOrEqualTo方法的具体用法?Java Result.isBetterOrEqualTo怎么用?Java Result.isBetterOrEqualTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hudson.model.Result
的用法示例。
在下文中一共展示了Result.isBetterOrEqualTo方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getRunStatus
import hudson.model.Result; //导入方法依赖的package包/类
private String getRunStatus(AbstractBuild<?, ?> theBuild) {
Result result = theBuild.getResult();
if (result != null) {
if (result.isBetterOrEqualTo(Result.SUCCESS)) {
return "PASSED";
} else if (result.isBetterOrEqualTo(Result.UNSTABLE)) {
return "WARNING";
} else if (result.equals(Result.ABORTED)) {
return "INTERRUPTED";
} else {
return "FAILED";
}
} else {
return "FAILED";
}
}
示例2: getResult
import hudson.model.Result; //导入方法依赖的package包/类
private Result getResult(View view) {
Result ret = Result.SUCCESS;
for (TopLevelItem item : view.getAllItems()) {
for (Job<?,?> job : item.getAllJobs()) {
Run<?, ?> build = job.getLastCompletedBuild();
if(build != null) {
Result result = build.getResult();
if(result.isBetterOrEqualTo(Result.FAILURE))
ret = ret.combine(result);
}
}
}
return ret;
}
示例3: getCommitState
import hudson.model.Result; //导入方法依赖的package包/类
public static GHCommitState getCommitState(final Run<?, ?> run, final GHCommitState unstableAs) {
GHCommitState state;
Result result = run.getResult();
if (isNull(result)) {
LOG.error("{} result is null.", run);
state = GHCommitState.ERROR;
} else if (result.isBetterOrEqualTo(SUCCESS)) {
state = GHCommitState.SUCCESS;
} else if (result.isBetterOrEqualTo(UNSTABLE)) {
state = unstableAs;
} else {
state = GHCommitState.FAILURE;
}
return state;
}
示例4: isSuccess
import hudson.model.Result; //导入方法依赖的package包/类
/**
* Is the build a success?
*
* @return true if the build is a success
*/
public boolean isSuccess() {
Result result = getResult();
return result != null && result.isBetterOrEqualTo(Result.SUCCESS);
}
示例5: isUnstable
import hudson.model.Result; //导入方法依赖的package包/类
/**
* Is the build unstable?
*
* @return true if the build is unstable
*/
public boolean isUnstable() {
Result result = getResult();
return result != null && result.isBetterOrEqualTo(Result.UNSTABLE) && result.isWorseThan(Result.SUCCESS);
}