-
-
Notifications
You must be signed in to change notification settings - Fork 53
[Proposal] Load YAML anchors declared in external YAML files #743
Copy link
Copy link
Open
Description
I have contributed a PR to enable YAML anchors and aliases in runn. Now, I want to empower the anchors and aliases feature more with the following feature that goccy/go-yaml provides. If we can use the feature effectively, we can write runbooks more DRY way.
- Reference elements declared in another file
https://github.com/goccy/go-yaml?tab=readme-ov-file#2-reference-elements-declared-in-another-file
[Draft] Specs.
- Add
--yaml-referencescommand line option that specifies where to load yaml files that define anchors globally- ex.)
runn run --yaml-references ./references/**/*.yml ./books/**/*.yml
- ex.)
- Use the
ReferenceReaders()function- We can apply the runn's
read:parentpolicy before passing the contents - We can use the same glob syntax like
testdata/references/**/*.yml
- We can apply the runn's
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels