use of org.jenkinsci.test.acceptance.plugins.parameterized_trigger.ParameterizedTrigger in project acceptance-test-harness by jenkinsci.
the class ParameterizedTriggerTest method triggerWithNonStandardArchiver.
@Test
@WithPlugins({ "compress-artifacts", "matrix-project" /*JENKINS-33910*/
})
@Issue("JENKINS-28980")
public void triggerWithNonStandardArchiver() {
CompressingArtifactManager.setup(jenkins);
FreeStyleJob target = jenkins.jobs.create();
target.configure();
target.addParameter(StringParameter.class).setName("PARAM");
target.addShellStep("test 'value' = $PARAM");
target.save();
FreeStyleJob trigger = jenkins.jobs.create();
trigger.configure();
trigger.addShellStep("echo 'PARAM=value' > my.properties");
ArtifactArchiver archiver = trigger.addPublisher(ArtifactArchiver.class);
archiver.includes("my.properties");
ParameterizedTrigger step = trigger.addPublisher(ParameterizedTrigger.class);
TriggerConfig config = step.getTriggerConfig(0);
config.projects.set(target.name);
FileBuildParameters params = config.addParameter(FileBuildParameters.class);
params.file.set("my.properties");
params.failIfMissing.check();
trigger.save();
trigger.startBuild().shouldSucceed();
Build downstream = target.build(1);
downstream.shouldSucceed();
}
Aggregations