updates Gems and jenkinsfile
This commit is contained in:
11
Gemfile
11
Gemfile
@@ -1,13 +1,14 @@
|
|||||||
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
source ENV['GEM_SOURCE'] || 'https://rubygems.org'
|
||||||
|
|
||||||
puppetversion = ENV.key?('PUPPET_VERSION') ? ENV['PUPPET_VERSION'] : ['>= 3.3']
|
puppetversion = ENV.key?('PUPPET_VERSION') ? ENV['PUPPET_VERSION'] : ['<= 5.5.6']
|
||||||
gem 'metadata-json-lint'
|
gem 'metadata-json-lint'
|
||||||
gem 'puppet', puppetversion
|
gem 'puppet', puppetversion
|
||||||
gem 'puppetlabs_spec_helper', '>= 1.0.0'
|
gem 'puppetlabs_spec_helper', '>= 1.0.0'
|
||||||
gem 'puppet-lint', '>= 1.0.0'
|
gem 'puppet-lint'
|
||||||
gem 'facter', '>= 1.7.0'
|
gem 'facter'
|
||||||
gem 'rspec-puppet'
|
gem 'rspec-puppet'
|
||||||
gem 'puppet-strings'
|
gem 'yard'
|
||||||
|
gem 'puppet-strings', '< 2.0.0'
|
||||||
gem 'rake'
|
gem 'rake'
|
||||||
gem 'semantic_puppet'
|
gem 'semantic_puppet'
|
||||||
gem 'rgen'
|
gem 'rgen'
|
||||||
@@ -19,5 +20,5 @@ if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
|
|||||||
gem 'rake', '~> 10.0'
|
gem 'rake', '~> 10.0'
|
||||||
else
|
else
|
||||||
# rubocop requires ruby >= 1.9
|
# rubocop requires ruby >= 1.9
|
||||||
gem 'rubocop'
|
gem 'rubocop', '<= 0.50.0'
|
||||||
end
|
end
|
||||||
|
|||||||
39
Jenkinsfile
vendored
39
Jenkinsfile
vendored
@@ -7,7 +7,7 @@ pipeline {
|
|||||||
|
|
||||||
stage('pulling master before adding files') {
|
stage('pulling master before adding files') {
|
||||||
steps {
|
steps {
|
||||||
sshagent(['0c22dc63-2ae0-4ad5-98e0-65aa0f0f411g']) {
|
sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) {
|
||||||
sh '''git config user.name "Jenkins Server"
|
sh '''git config user.name "Jenkins Server"
|
||||||
git config user.email jenkins@confdroid.com
|
git config user.email jenkins@confdroid.com
|
||||||
git pull origin master
|
git pull origin master
|
||||||
@@ -24,13 +24,13 @@ pipeline {
|
|||||||
|
|
||||||
stage('puppet-lint tests') {
|
stage('puppet-lint tests') {
|
||||||
steps {
|
steps {
|
||||||
sh '''find . -iname *.pp -exec puppet-lint \\
|
sh '''find . -iname *.pp -exec /var/lib/jenkins/bin/puppet-lint \\
|
||||||
--no-class_inherits_from_params_class-check \\
|
--no-class_inherits_from_params_class-check \\
|
||||||
--no-variable_scope-check \\
|
--no-variable_scope-check \\
|
||||||
--no-80chars-check \\
|
--no-80chars-check \\
|
||||||
--no-140chars-check \\
|
|
||||||
--no-arrow_alignment-check \\
|
--no-arrow_alignment-check \\
|
||||||
--no-autoloader_layout-check \\
|
--no-autoloader_layout-check \\
|
||||||
|
--no-140chars-check \\
|
||||||
--log-format "%{path}:%{line}:%{check}:%{KIND}:%{message}" {} \\;'''
|
--log-format "%{path}:%{line}:%{check}:%{KIND}:%{message}" {} \\;'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -38,7 +38,7 @@ pipeline {
|
|||||||
stage('puppet parser test') {
|
stage('puppet parser test') {
|
||||||
steps {
|
steps {
|
||||||
sh '''for file in $(find . -iname \'*.pp\'); do
|
sh '''for file in $(find . -iname \'*.pp\'); do
|
||||||
puppet parser validate --color false --render-as s --modulepath=modules $file || exit 1;
|
/opt/puppetlabs/bin/puppet parser validate --color false --render-as s --modulepath=modules $file || exit 1;
|
||||||
done;'''
|
done;'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,16 +59,14 @@ pipeline {
|
|||||||
|
|
||||||
stage('update repo structure') {
|
stage('update repo structure') {
|
||||||
steps {
|
steps {
|
||||||
sh '''if [ test -f REPOSTRUCTURE.md ]; then
|
sh '''rm -Rf REPOSTRUCTURE.md
|
||||||
rm -Rf REPOSTRUCTURE.md
|
|
||||||
fi
|
|
||||||
echo "$(tree --dirsfirst --charset=ascii .)" > REPOSTRUCTURE.md'''
|
echo "$(tree --dirsfirst --charset=ascii .)" > REPOSTRUCTURE.md'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('create Puppet documention') {
|
stage('create Puppet documention') {
|
||||||
steps {
|
steps {
|
||||||
sh 'puppet strings'
|
sh '/opt/puppetlabs/bin/puppet strings'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -97,7 +95,7 @@ Changelog of Git Changelog.
|
|||||||
|
|
||||||
|
|
||||||
{{#commits}}
|
{{#commits}}
|
||||||
<a href="https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/{{hash}}">{{hash}}</a> {{authorName}} <i>{{commitTime}}</i>
|
<a href="https://gitlab.confdroid.com/12WW1160/git-changelog-lib/commit/{{hash}}">{{hash}}</a> {{authorName}} <i>{{commitTime}}</i>
|
||||||
<p>
|
<p>
|
||||||
<h3>{{{messageTitle}}}</h3>
|
<h3>{{{messageTitle}}}</h3>
|
||||||
|
|
||||||
@@ -130,7 +128,7 @@ Changelog of Git Changelog.
|
|||||||
{{/hasIssue}}
|
{{/hasIssue}}
|
||||||
|
|
||||||
{{#commits}}
|
{{#commits}}
|
||||||
[https://gitlab.puppetsoft.com/12WW1160/git-changelog-lib/commit/{{hash}} {{hash}}] {{authorName}} {{commitTime}}
|
[https://gitlab.confdroid.com/12WW1160/git-changelog-lib/commit/{{hash}} {{hash}}] {{authorName}} {{commitTime}}
|
||||||
|
|
||||||
\'\'\'{{{messageTitle}}}\'\'\'
|
\'\'\'{{{messageTitle}}}\'\'\'
|
||||||
|
|
||||||
@@ -165,7 +163,7 @@ Changelog of Git Changelog.
|
|||||||
|
|
||||||
|
|
||||||
{{#commits}}
|
{{#commits}}
|
||||||
<a href="https://github.com/12WW1160/git-changelog-lib/commit/{{hash}}">{{hash}}</a> {{authorName}} <i>{{commitTime}}</i>
|
<a href="https://gitlab.confdroid.com/12WW1160/git-changelog-lib/commit/{{hash}}">{{hash}}</a> {{authorName}} <i>{{commitTime}}</i>
|
||||||
<p>
|
<p>
|
||||||
<h3>{{{messageTitle}}}</h3>
|
<h3>{{{messageTitle}}}</h3>
|
||||||
|
|
||||||
@@ -184,34 +182,19 @@ Changelog of Git Changelog.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('check for UTF-8 files') {
|
|
||||||
steps {
|
|
||||||
sh '''if [ ! -d tests ]; then
|
|
||||||
mkdir tests
|
|
||||||
fi
|
|
||||||
if [ -f tests/UTF_Files ]; then
|
|
||||||
rm -Rf tests/UTF_Files
|
|
||||||
fi
|
|
||||||
echo "$(find . -type f -exec file {} \\;)" > FileList
|
|
||||||
echo "$(grep -v ASCII FileList | grep -v git)" > tests/UTF_Files'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('show diff') {
|
stage('show diff') {
|
||||||
steps {
|
steps {
|
||||||
sh 'git diff'
|
sh 'git diff'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
stage('recommit changes to repo') {
|
stage('recommit changes to repo') {
|
||||||
steps {
|
steps {
|
||||||
sshagent(['0c22dc63-2ae0-4ad5-98e0-65aa0f0f411g']) {
|
sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) {
|
||||||
sh '''git config user.name "Jenkins Server"
|
sh '''git config user.name "Jenkins Server"
|
||||||
git config user.email jenkins@confdroid.com
|
git config user.email jenkins@confdroid.com
|
||||||
echo `git add -A && git commit -am "recommit for updates in build $BUILD_NUMBER"`
|
echo `git add -A && git commit -am "recommit for updates in build $BUILD_NUMBER"`
|
||||||
git push origin HEAD:jenkins'''
|
git push origin HEAD:master'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user