upstream.getBuildersList().clear();
upstream.getBuildersList().add(wfb);
upstream.getPublishersList().clear();
upstream.getPublishersList().add(new BuildTrigger(
new BuildTriggerConfig(downstream.getFullName(), ResultCondition.SUCCESS, true, Arrays.<AbstractBuildParameters>asList(
new FileBuildParameters("properties.txt", null, false, false, null, false)
))
));
jenkins.rebuildDependencyGraph();
assertEquals(0, downstream.getBuilds().size());
upstream.scheduleBuild2(0).get();
waitUntilNoActivity();
assertEquals(1, downstream.getBuilds().size());
FreeStyleBuild build = downstream.getLastBuild();
assertNull(getStringParameterValue(build, "triggered_child1"));
assertNull(getStringParameterValue(build, "triggered_child2"));
build.delete();
}
// With useMatrixBuild, publisher
// Downstream project is triggered with parameters, merging properties files in all children.
{
upstream.getBuildersList().clear();
upstream.getBuildersList().add(wfb);
upstream.getPublishersList().clear();
upstream.getPublishersList().add(new BuildTrigger(
new BuildTriggerConfig(downstream.getFullName(), ResultCondition.SUCCESS, true, Arrays.<AbstractBuildParameters>asList(
new FileBuildParameters("properties.txt", null, false, true, null, false)
))
));
jenkins.rebuildDependencyGraph();