Skip to content

Merge several YAML files and extract one value from the rightmost one #1943

Closed Answered by victor-sudakov
victor-sudakov asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @mikefarah Can I supply the files to merge as command line parameters because 1) there maybe more than two and their number may vary and 2) their names can be variables and I'd avoid placing variables into single ticks?

Do I have to use the syntax yq eval-all '. as $item ireduce ({}; . * $item ) | .image.phptests.tag' values*.yml in this case?

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@victor-sudakov
Comment options

Answer selected by victor-sudakov
@mikefarah
Comment options

@victor-sudakov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants