consolidate puppet-lint
This commit is contained in:
46
Jenkinsfile
vendored
46
Jenkinsfile
vendored
@@ -31,13 +31,29 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('install required gems') {
|
||||
stage('install gems') {
|
||||
steps {
|
||||
sh 'bundle install'
|
||||
}
|
||||
}
|
||||
|
||||
stage('puppet-lint tests') {
|
||||
stage('puppet parser') {
|
||||
steps {
|
||||
sh '''for file in $(find . -iname \'*.pp\'); do
|
||||
/opt/puppetlabs/bin/puppet parser validate --color false --render-as s --modulepath=modules $file || exit 1;
|
||||
done;'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('check templates') {
|
||||
steps{
|
||||
sh '''for file in $(find . -iname \'*.erb\');
|
||||
do erb -P -x -T "-" $file | ruby -c || exit 1;
|
||||
done;'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('puppet-lint') {
|
||||
steps {
|
||||
sh '''find . -iname *.pp -exec /var/lib/jenkins/bin/puppet-lint \\
|
||||
--no-class_inherits_from_params_class-check \\
|
||||
@@ -46,32 +62,12 @@ pipeline {
|
||||
--no-arrow_alignment-check \\
|
||||
--no-autoloader_layout-check \\
|
||||
--no-140chars-check \\
|
||||
--log-format "%{path}:%{line}:%{check}:%{KIND}:%{message}" {} \\;'''
|
||||
--log-format "%{path}:%{line}:%{check}:%{KIND}:%{message}" {} \\;
|
||||
'''
|
||||
recordIssues aggregatingResults: true, tool: puppetLint()
|
||||
}
|
||||
}
|
||||
|
||||
stage('puppet parser test') {
|
||||
steps {
|
||||
sh '''for file in $(find . -iname \'*.pp\'); do
|
||||
/opt/puppetlabs/bin/puppet parser validate --color false --render-as s --modulepath=modules $file || exit 1;
|
||||
done;'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('Puppet ERB template test') {
|
||||
steps{
|
||||
sh '''for file in $(find . -iname \'*.erb\');
|
||||
do erb -P -x -T "-" $file | ruby -c || exit 1;
|
||||
done;'''
|
||||
}
|
||||
}
|
||||
|
||||
stage('compiler warnings') {
|
||||
steps {
|
||||
scanForIssues tool: puppetLint()
|
||||
}
|
||||
}
|
||||
|
||||
stage('update repo structure') {
|
||||
steps {
|
||||
sh '''rm -Rf REPOSTRUCTURE.md
|
||||
|
||||
@@ -88,7 +88,6 @@ The following parameters are editable via params.pp or through ENC (**__recommen
|
||||
* `$ae_manage_dirs` : Whether or not to manage the directory structure. Defaults to `true`.
|
||||
* `$ae_allow_user_dirs` : Whether or not to allow presenting content from end user home directories. Defaults to `false`.
|
||||
|
||||
|
||||
### SELINUX
|
||||
All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user