consolidate puppet-lint

This commit is contained in:
12WW1160
2020-12-04 14:49:38 +01:00
parent 8a1873962c
commit 8aeda53b69
2 changed files with 21 additions and 26 deletions

46
Jenkinsfile vendored
View File

@@ -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

View File

@@ -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.