job('example') { steps { downstreamParameterized { trigger('Project1') { block { buildStepFailure('FAILURE') failure('FAILURE') unstable('UNSTABLE') } parameterFactories { // Looks for files that match the specified pattern in the current build, then for each of them trigger a build of the specified project(s) by passing that file as a file parameter. forMatchingFiles("*cool*", "test") configure { it /'builders'/'hudson.plugins.parameterizedtrigger.TriggerBuilder'/'configs'/'hudson.plugins.parameterizedtrigger.BlockableBuildTriggerConfig/configFactories'/'hudson.plugins.parameterizedtrigger.FileBuildParameterFactory' } } } } } }