I'm writing a plugin that triggers new builds (with the purpose of culprit-finding), using new BuildCustomizer().createPromotion().
I need to pass some data to each triggered build. Currently I'm doing that by specifying parameters (buildCustomizer.setParameters()). However, the data is of arbitrary length and I'd prefer to attach a file to the triggered build. Is that possible somehow?
If files are not an option, and I must use parameters: how can the triggered build handle the parameter safely? Suppose the build needs to pass this to a script foo as a command-line parameter. I can't simply call foo -a "%my.param%" because %my.param% is potentially too long for a command line, and/or contains new lines or quotes.