For steps that can process multiple files, sometimes the desire is to process the files individually. For example see
QB-1305. A workaround for
QB-1305 is to setup a repeating parameter using groovy script below to process the files individually rather than in aggregate. Please add a pre-defined value definition that takes the common 'Source Directory' and 'Files to process' fields and returns the list that we can loop over.
${groovy:
java.io.File[] files = util.getFile(vars.getValue("aggregatorPomDir")).listFiles();
java.util.List<String> list = new java.util.ArrayList<String>();
for (java.io.File each : files) {
if (each.isDirectory() && each.getName().startsWith("com.lgc"))
list.add(each.getName());
\}
return util.join(list);
}