本文整理汇总了Java中hudson.model.FreeStyleBuild.addAction方法的典型用法代码示例。如果您正苦于以下问题:Java FreeStyleBuild.addAction方法的具体用法?Java FreeStyleBuild.addAction怎么用?Java FreeStyleBuild.addAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hudson.model.FreeStyleBuild
的用法示例。
在下文中一共展示了FreeStyleBuild.addAction方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGetMetricsWithBuildActionResult
import hudson.model.FreeStyleBuild; //导入方法依赖的package包/类
@Test
public void testGetMetricsWithBuildActionResult() throws Exception {
FreeStyleBuild build = getBuild();
build.addAction(CoberturaBuildAction.load(
build,
getMockResult(),
null,
null,
false,
false,
false,
false,
false
));
provider.setBuild(build);
assertTrue(provider.hasCoverage());
CodeCoverageMetrics metrics = provider.getMetrics();
assertNotNull(metrics);
assertEquals(75.0f, metrics.getLineCoveragePercent(), 0.0f);
}
示例2: addNewContainerIds
import hudson.model.FreeStyleBuild; //导入方法依赖的package包/类
@Test
public void addNewContainerIds() throws Exception {
FreeStyleBuild build = j.createFreeStyleProject().scheduleBuild2(0).get();
final EnvVars envVars = new EnvVars();
build.addAction(contributedEnvVars("new,ids"));
contributor.buildEnvironmentFor(build, envVars, null);
assertEquals("new,ids", envVars.get(contributor.CONTAINER_IDS_ENV_VAR));
}
示例3: mergeContainerIds
import hudson.model.FreeStyleBuild; //导入方法依赖的package包/类
@Test
public void mergeContainerIds() throws Exception {
FreeStyleBuild build = j.createFreeStyleProject().scheduleBuild2(0).get();
final EnvVars envVars = existingEnvVars("original");
build.addAction(contributedEnvVars("new"));
contributor.buildEnvironmentFor(build, envVars, null);
assertEquals("original,new", envVars.get(contributor.CONTAINER_IDS_ENV_VAR));
}
示例4: collapseSameContainerIds
import hudson.model.FreeStyleBuild; //导入方法依赖的package包/类
@Test
public void collapseSameContainerIds() throws Exception {
FreeStyleBuild build = j.createFreeStyleProject().scheduleBuild2(0).get();
final EnvVars envVars = existingEnvVars("existing,duplicate");
build.addAction(contributedEnvVars("duplicate"));
build.addAction(contributedEnvVars("new"));
contributor.buildEnvironmentFor(build, envVars, null);
assertEquals("existing,duplicate,new", envVars.get(contributor.CONTAINER_IDS_ENV_VAR));
}