Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserve field order when updating kustomization.yaml file #666

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jtdoepke
Copy link

@jtdoepke jtdoepke commented Jan 9, 2024

This commit causes argocd-image-updater to preserve the order of fields in the kustomization.yaml file when updating the image(s). Doing so will minimize git diffs in the case that other tools also edit the kustomization.yaml file.

Fixes #502

@codecov-commenter
Copy link

codecov-commenter commented Jan 9, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (7d93c7a) 66.27% compared to head (3b8a879) 66.06%.

Files Patch % Lines
pkg/argocd/git.go 25.00% 4 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #666      +/-   ##
==========================================
- Coverage   66.27%   66.06%   -0.22%     
==========================================
  Files          22       22              
  Lines        2150     2160      +10     
==========================================
+ Hits         1425     1427       +2     
- Misses        591      595       +4     
- Partials      134      138       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jtdoepke
Copy link
Author

jtdoepke commented Jan 9, 2024

The build_image job failed, but I'm pretty sure that's not due to my changes.

This commit causes argocd-image-updater to preserve the order of fields
in the kustomization.yaml file when updating the image(s). Doing so will
minimize git diffs in the case that other tools also edit the
kustomization.yaml file.

Fixes argoproj-labs#502
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retain or sort YAML ordering of images component when using Git write-back method
2 participants