You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to update each image-id in test.yaml from the image_id given in trigger_payload.yaml if their image names match the full_name and leave them unchanged if they do not match.
the expected result would be
I was hoping to find a single yq expression to do this, but alas I can quite wrap my head aroud it. I do have a solution looping over the events in trigger_payload.yaml in a bash loop which I do not like too much. Any hints greately appreciated. Thanks!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I need to update in a yaml file parts of a value from values in a second yaml file. specifically using this representative test case:
test.yaml:
trigger_payload.yaml:
I need to update each image-id in test.yaml from the image_id given in trigger_payload.yaml if their image names match the full_name and leave them unchanged if they do not match.
the expected result would be
I was hoping to find a single yq expression to do this, but alas I can quite wrap my head aroud it. I do have a solution looping over the events in trigger_payload.yaml in a bash loop which I do not like too much. Any hints greately appreciated. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions