Skip to content

Commit

Permalink
Merge pull request #236 from instrumenta/carlossg-patch-1
Browse files Browse the repository at this point in the history
find + exec is very slow
  • Loading branch information
garethr authored May 15, 2020
2 parents dbeb2a2 + ffcd01d commit 7721cbe
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions docs/contrib.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Add the following to your Kubernetes configs repository in `.git/hooks/pre-commi
This will validate all the `yaml` files in the top directory of the repository.

```shell
#!/bin/sh
#!/bin/sh -e

echo "Running kubeval validations..."

Expand All @@ -20,11 +20,7 @@ if ! [ -x "$(command -v kubeval)" ]; then
fi

# Inspect code using kubeval
find . -maxdepth 1 -name '*.yaml' -exec kubeval {} \;

status=$?

if [ "$status" = 0 ] ; then
if kubeval --strict -d . ; then
echo "Static analysis found no problems."
exit 0
else
Expand Down

0 comments on commit 7721cbe

Please sign in to comment.