Details
-
Improvement
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
None
-
Jenkins 2.235.2
Description
It's unclear how a List passed to writeYaml should be written: as a single sequence document or as multiple documents: one per element in the list. writeYaml always creates a single document, but I need it to write multiple documents instead.
I propose that an optional field be added to writeYaml so that List data can be serialized as single or multiple documents. Maybe something like writeMultipleDocuments or serializeMultipleDocuments or serializeListDataAsMultipleDocuments.
The implementation should be trivial: simply call dumpAll on step.getData().iterator() instead of dump when the new option is set.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
It's unclear how a {{List}} passed to {{writeYaml}} should be written: as a single sequence document or as multiple documents: one per element in the list. {{writeYaml}} always creates a single document, but I need it to write multiple documents instead. I propose that an optional field be added to {{writeYaml}} so that {{List}} data can be serialized as single or multiple documents. Maybe something like {{writeMultipleDocuments}} or {{serializeMultipleDocuments}} or {{serializeListDataAsMultipleDocuments}}. The implementation should be trivial: simply call {{dumpAll on step{{.}}{{getData}}().iterator()}} instead of {{dump}} when the new option is set. |
It's unclear how a {{List}} passed to {{writeYaml}} should be written: as a single sequence document or as multiple documents: one per element in the list. {{writeYaml}} always creates a single document, but I need it to write multiple documents instead. I propose that an optional field be added to {{writeYaml}} so that {{List}} data can be serialized as single or multiple documents. Maybe something like {{writeMultipleDocuments}} or {{serializeMultipleDocuments}} or {{serializeListDataAsMultipleDocuments}}. The implementation should be trivial: simply call {{dumpAll}} on {{step.getData().iterator()}} instead of {{dump}} when the new option is set. |