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

Verify that a rendered template is valid YAML #1362

Merged
merged 2 commits into from
Feb 25, 2020

Conversation

ANeumann82
Copy link
Member

Fix makefile if PATH does not include GOPATH/bin

Signed-off-by: Andreas Neumann aneumann@mesosphere.com

Fix makefile if PATH does not include GOPATH/bin

Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Copy link
Member

@nfnt nfnt left a comment

Choose a reason for hiding this comment

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

LGTM! Only nits.

pkg/kudoctl/packages/verifier/template/verify_render.go Outdated Show resolved Hide resolved
./hack/install-golangcilint.sh
endif
golangci-lint run
if [ ! -f ${GOPATH}/bin/golangci-lint ]; then ./hack/install-golangcilint.sh; fi
Copy link
Member

@nfnt nfnt Feb 24, 2020

Choose a reason for hiding this comment

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

This assumes that golangci-lint is in $GOPATH/bin. If it has been installed elsewhere (e.g. by using the homebrew tap), this will run the script anyways. OTOH,hack/install-golangcilint.sh assumes that $GOPATH/bin is in $PATH 🤷‍♂
How about adding $GOPATH/bin to $PATH in hack/install-golangcilint.sh?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, that's too late :(
Because hack/install-golangcilint.sh doesn't run golangci-lint. The path manipulation would have to be done in the Makefile. Let's not change it in the Makefile and let's keep your approach.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah... It's messy :(

Co-Authored-By: Jan Schlicht <jan@d2iq.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
@ANeumann82 ANeumann82 merged commit 8616529 into master Feb 25, 2020
@ANeumann82 ANeumann82 deleted the an/verify-valid-yaml-template branch February 25, 2020 10:49
runyontr pushed a commit that referenced this pull request Mar 11, 2020
* Verify that a rendered template is valid YAML

Co-Authored-By: Jan Schlicht <jan@d2iq.com>
Signed-off-by: Andreas Neumann <aneumann@mesosphere.com>
Signed-off-by: Thomas Runyon <runyontr@gmail.com>
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.

None yet

2 participants