-
Notifications
You must be signed in to change notification settings - Fork 19
Add helper image merger to merge yaml files
#428
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
Conversation
It can be used to merge differnet yaml files before passing them to jinja2 template
mszostok
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works good 👍 but please address small comments
- Please update the main README: https://github.com/capactio/capact/blob/926517cc92f3680868fadf2e2b1ab821b987859b/hack/images/README.md
(you can also get rid of this structure) - Please add this image also here:
Line 22 in b3228c7
INFRA = json-go-gen graphql-schema-linter jinja2
Co-authored-by: Mateusz Szostok <szostok.mateusz@gmail.com>
Co-authored-by: Mateusz Szostok <szostok.mateusz@gmail.com>
Co-authored-by: Mateusz Szostok <szostok.mateusz@gmail.com>
Co-authored-by: Mateusz Szostok <szostok.mateusz@gmail.com>
hack/images/README.md
Outdated
| ├── json-go-gen # The image that contains quicktype to generates Go struct from JSON Schemas | ||
| └── graphql-schema-linter # The image that contains graphql-schema-linter to lint GraphQL files | ||
| ├── graphql-schema-linter # The image that contains graphql-schema-linter to lint GraphQL files | ||
| └── merger # The image that contains yaml merger helper scriptyaml merger helper script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| └── merger # The image that contains yaml merger helper scriptyaml merger helper script | |
| └── merger # The image that contains YAML merger helper |
hm.. sth was merged here 🤔 😜
NOTE:
I also thought about not changing the input YAML files, or maybe put them in /yamls/processed/*. Now when you executed the docker run.. twice then it will generate different output. So maybe in the future if we will implement argo retry for failed step it may cause some not deterministic output. On the other hand, we have a copy of artifacts, so maybe it will work properly. For now it can stay as it is 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I see, during argo retry the pod is recreated(with the same name) and artifacts are downloaded again. We should be good here
Co-authored-by: Mateusz Szostok <szostok.mateusz@gmail.com>
Description
Changes proposed in this pull request:
mergerto merge yaml filesTesting
Build image
docker build -t merger .Create few yaml files:
input.yaml:additional:yaml:extra.yaml:Run merger
docker run --mount src=`pwd`,target=/yamls,type=bind -e OUT=/yamls/all.yaml mergerCheck the output file:
all.yamlRelated issue(s)
#419