本文整理了Java中jenkins.model.Jenkins.setScmCheckoutRetryCount()
方法的一些代码示例,展示了Jenkins.setScmCheckoutRetryCount()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Jenkins.setScmCheckoutRetryCount()
方法的具体详情如下:
包路径:jenkins.model.Jenkins
类名称:Jenkins
方法名:setScmCheckoutRetryCount
暂无
代码示例来源:origin: jenkinsci/jenkins
@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
try {
// for compatibility reasons, this value is stored in Jenkins
Jenkins.get().setScmCheckoutRetryCount(json.getInt("scmCheckoutRetryCount"));
return true;
} catch (IOException e) {
throw new FormException(e,"quietPeriod");
} catch (JSONException e) {
throw new FormException(e.getMessage(), "quietPeriod");
}
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
@Override
public boolean configure(StaplerRequest req, JSONObject json) throws FormException {
try {
// for compatibility reasons, this value is stored in Jenkins
Jenkins.getInstance().setScmCheckoutRetryCount(json.getInt("scmCheckoutRetryCount"));
return true;
} catch (IOException e) {
throw new FormException(e,"quietPeriod");
} catch (JSONException e) {
throw new FormException(e.getMessage(), "quietPeriod");
}
}
}
代码示例来源:origin: jenkinsci/workflow-cps-plugin
@Issue("JENKINS-39194")
@Test public void retry() throws Exception {
// We use an un-initialized repo here to test retry
WorkflowJob p = r.jenkins.createProject(WorkflowJob.class, "p");
GitStep step = new GitStep(invalidRepo.toString());
CpsScmFlowDefinition def = new CpsScmFlowDefinition(step.createSCM(), "flow.groovy");
def.setLightweight(false);
p.setDefinition(def);
r.jenkins.setScmCheckoutRetryCount(1);
WorkflowRun b = r.assertBuildStatus(Result.FAILURE, p.scheduleBuild2(0));
r.assertLogContains("Could not read from remote repository", b);
r.assertLogContains("Retrying after 10 seconds", b);
}
内容来源于网络,如有侵权,请联系作者删除!