Created
June 2, 2015 18:59
-
-
Save marshyski/b7060ea230c6c4d4f27f to your computer and use it in GitHub Desktop.
Puppet Lint, Parser Validate, Noop and Add Header
This file contains 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
PUPPET=/usr/local/bin/puppet | |
LINT=/usr/local/bin/puppet-lint | |
for x in `find . -iname *.pp`; do echo $x ; ${LINT} --no-2sp_soft_tabs-check --no-80chars-check --no-autoloader_layout-check -f $x \ | |
--log-format "%{path}:%{line}:%{check}:%{KIND}:%{message}" ;\ | |
echo "";\ | |
done | |
for x in `find . | grep '.svn\|.git'`; do rm -rf $x ; done | |
for x in `find . -type f -iname *.pp | cut -c 3-`; do echo $x ;sed -i "1s/^/# == Jenkins: `date` $BUILD_TAG \n/" $x ; done | |
echo $WORKSPACE; echo "" | |
for x in `find . -type f | grep init.pp | grep -v tests`; do \ | |
${PUPPET} apply --verbose --noop --modulepath $WORKSPACE `find $WORKSPACE | grep 'manifests/init.pp'` --noop; \ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment