Skip to content

Instantly share code, notes, and snippets.

@marshyski
Created June 2, 2015 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshyski/b7060ea230c6c4d4f27f to your computer and use it in GitHub Desktop.
Save marshyski/b7060ea230c6c4d4f27f to your computer and use it in GitHub Desktop.
Puppet Lint, Parser Validate, Noop and Add Header
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