本文整理了Java中hudson.model.Project.scheduleBuild2()
方法的一些代码示例,展示了Project.scheduleBuild2()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Project.scheduleBuild2()
方法的具体详情如下:
包路径:hudson.model.Project
类名称:Project
方法名:scheduleBuild2
暂无
代码示例来源:origin: com.cisco.step.jenkins.plugins/jenkow-plugin
if (!wrappers.contains(wrapper.getDescriptor())) wrappers.add(wrapper);
p.scheduleBuild2(jenkins.getQuietPeriod(),new WorkflowCause("triggered by workflow"),ja);
return;
代码示例来源:origin: jenkinsci/rebuild-plugin
/**
* Tests with no extensions.
*
* @throws IOException
* IOException
* @throws InterruptedException
* InterruptedException
* @throws ExecutionException
* ExecutionException
*/
public void testNoRebuildValidatorExtension() throws IOException,
InterruptedException, ExecutionException {
Project projectA = createFreeStyleProject("testFreeStyleA");
Build buildA = (Build) projectA.scheduleBuild2(
0,
new Cause.UserIdCause(),
new ParametersAction(new StringParameterValue("party",
"megaparty"))).get();
assertNotNull(buildA.getAction(RebuildAction.class));
}
代码示例来源:origin: jenkinsci/rebuild-plugin
/**
* Tests with an extension returning isApplicable false.
*
* @throws IOException
* IOException
* @throws InterruptedException
* InterruptedException
* @throws ExecutionException
* ExecutionException
*/
public void testRebuildValidatorExtensionIsApplicableFalse()
throws IOException, InterruptedException, ExecutionException {
hudson.getExtensionList(RebuildValidator.class).add(0,
new ValidatorNeverApplicable());
Project projectA = createFreeStyleProject("testFreeStyleC");
Build buildA = (Build) projectA.scheduleBuild2(
0,
new Cause.UserIdCause(),
new ParametersAction(new StringParameterValue("party",
"megaparty"))).get();
assertNotNull(buildA.getAction(RebuildAction.class));
}
代码示例来源:origin: jenkinsci/rebuild-plugin
/**
* Tests with an extension returning isApplicable true.
*
* @throws IOException
* IOException
* @throws InterruptedException
* InterruptedException
* @throws ExecutionException
* ExecutionException
*/
public void testRebuildValidatorExtensionIsApplicableTrue()
throws IOException, InterruptedException, ExecutionException {
hudson.getExtensionList(RebuildValidator.class).add(0,
new ValidatorAlwaysApplicable());
Project projectA = createFreeStyleProject("testFreeStyleB");
Build buildA = (Build) projectA.scheduleBuild2(
0,
new Cause.UserIdCause(),
new ParametersAction(new StringParameterValue("party",
"megaparty"))).get();
assertNull(buildA.getAction(RebuildAction.class));
}
代码示例来源:origin: jenkinsci/rebuild-plugin
/**
* Tests with two extensions returning isApplicable true AND false.
*
* @throws IOException
* IOException
* @throws InterruptedException
* InterruptedException
* @throws ExecutionException
* ExecutionException
*/
public void testRebuildValidatorExtensionIsApplicableTrueFalse()
throws IOException, InterruptedException, ExecutionException {
hudson.getExtensionList(RebuildValidator.class).add(0,
new ValidatorAlwaysApplicable());
hudson.getExtensionList(RebuildValidator.class).add(0,
new ValidatorNeverApplicable());
Project projectA = createFreeStyleProject("testFreeStyleC");
Build buildA = (Build) projectA.scheduleBuild2(
0,
new Cause.UserIdCause(),
new ParametersAction(new StringParameterValue("party",
"megaparty"))).get();
assertNull(buildA.getAction(RebuildAction.class));
}
内容来源于网络,如有侵权,请联系作者删除!