Last active
February 14, 2017 21:54
-
-
Save bpholt/5230644 to your computer and use it in GitHub Desktop.
Puppet Module Syntax Check, Lint, Run Tests, and ERB Syntax Check. There is almost certainly a better way to do this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Run from the base directory of your Puppet module | |
echo =================== | |
echo Parser Validation | |
echo =================== | |
find . -name "*.pp" | xargs -n 1 -t puppet parser validate | |
echo =================== | |
echo Linting | |
echo =================== | |
find . -name "*.pp" | xargs -n 1 -t puppet-lint | |
echo =================== | |
echo Applying Tests | |
echo =================== | |
find tests -name "*.pp" | xargs -n 1 -t puppet apply --noop | |
echo =================== | |
echo Checking ERB Syntax | |
echo =================== | |
find . -name "*.erb" | xargs -n 1 -t -I \{\} erb -P -x -T '-' \{\} | ruby -c | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment