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

Fix validate script to capture pipestatus #8

Merged
merged 1 commit into from
Jan 7, 2021

Conversation

raphapr
Copy link
Contributor

@raphapr raphapr commented Jan 6, 2021

when kustomize build gets error, kubeval recognizes the output as empty YAML and gives PASS. use PIPESTATUS to properly capture exit status of piped command as workaround.

things like that could happen:

$ kustomize build blabla.yaml | kubeval
Error: error creating new loader with git: url lacks orgRepo: blabla.yaml, dir: evalsymlink failure on 'blabla.yaml' : lstat /home/raphael/repos/flux2-kustomize-helm-example/blabla.yaml: no such file or directory, get: invalid source string: blabla.yaml
PASS - stdin contains an empty YAML document

Signed-off-by: Raphael P. Ribeiro <raphaelpr01@gmail.com>
@raphapr raphapr force-pushed the fix-validate-script branch from d551b53 to b07868b Compare January 6, 2021 17:25
@raphapr raphapr changed the title Fix validate script to capture pipestatus Fix validate script to capture piped command Jan 6, 2021
@raphapr raphapr changed the title Fix validate script to capture piped command Fix validate script to capture pipestatus Jan 6, 2021
Copy link
Member

@stefanprodan stefanprodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stefanprodan stefanprodan merged commit 4137baf into fluxcd:main Jan 7, 2021
@raphapr raphapr deleted the fix-validate-script branch January 7, 2021 18:51
@raphapr
Copy link
Contributor Author

raphapr commented Jan 7, 2021

@stefanprodan no problem. sent a PR there fluxcd/flux2-multi-tenancy#9

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.

2 participants