use of org.jenkinsci.plugins.workflow.support.steps.build.BuildTriggerStep in project workflow-cps-plugin by jenkinsci.
the class SnippetizerTest method buildTriggerStep.
@Test
public void buildTriggerStep() throws Exception {
BuildTriggerStep step = new BuildTriggerStep("downstream");
st.assertRoundTrip(step, "build 'downstream'");
step.setParameters(Arrays.asList(new StringParameterValue("branch", "default"), new BooleanParameterValue("correct", true)));
if (StringParameterDefinition.DescriptorImpl.class.isAnnotationPresent(Symbol.class)) {
st.assertRoundTrip(step, "build job: 'downstream', parameters: [string(name: 'branch', value: 'default'), booleanParam(name: 'correct', value: true)]");
} else {
// TODO 2.x delete
st.assertRoundTrip(step, "build job: 'downstream', parameters: [[$class: 'StringParameterValue', name: 'branch', value: 'default'], [$class: 'BooleanParameterValue', name: 'correct', value: true]]");
}
}
Aggregations