A team maintains pipeline definitions for dozens of services in one file. Reviewers need inline comments explaining exceptions, and one edit to the shared hardening block must apply to every job that references it. Which format and feature fit?
Show the answer
Correct answerB. YAML using anchors and aliases
AWhy not this: JSON has no comment syntax and no native way to reference a shared block, so nesting alone does not propagate one edit.
BWhy this is right: YAML supports # comments and anchors with aliases, so one shared block is edited once and reused by every job that references it.
CWhy not this: TOML supports comments, but its tables only group keys; they cannot be referenced from other tables to reuse a block.
DWhy not this: XML attributes carry values on individual elements and do not create a reusable shared block that other jobs reference.
YAML anchors (&) and aliases (*) let a block be defined once and referenced by many jobs, and YAML supports # comments. JSON has neither comments nor reference syntax, and TOML tables group keys but cannot be reused by reference.