當前位置: 首頁>>代碼示例>>Java>>正文


Java Result.isBetterOrEqualTo方法代碼示例

本文整理匯總了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";
    }
}
 
開發者ID:jenkinsci,項目名稱:ontrack-plugin,代碼行數:17,代碼來源:OntrackValidationRunNotifier.java

示例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;
}
 
開發者ID:baloise,項目名稱:rocket-chat-notifier,代碼行數:15,代碼來源:ViewTracker.java

示例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;
}
 
開發者ID:KostyaSha,項目名稱:github-integration-plugin,代碼行數:16,代碼來源:JobHelper.java

示例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);
}
 
開發者ID:jenkinsci,項目名稱:ontrack-plugin,代碼行數:10,代碼來源:JenkinsConnector.java

示例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);
}
 
開發者ID:jenkinsci,項目名稱:ontrack-plugin,代碼行數:10,代碼來源:JenkinsConnector.java


注:本文中的hudson.model.Result.isBetterOrEqualTo方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。