Add Gemfile and puppet 4 checks
In anticipation of puppet 4, start trying to deal with puppet 4 things that can be helpfully predicted by puppet lint plugins. This patch also corrects lint errors caught by the puppet-lint-absolute_classname-check and puppet-lint-empty_string-check gems as well as arrow alignment which wasn't being caught under the system version of puppet-lint. Change-Id: I5552777ba63d07039f9b2bed9c4100a44e6a0255
This commit is contained in:
parent
937c3d7f49
commit
f1b7e20f52
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
Gemfile.lock
|
||||
.bundled_gems/
|
30
Gemfile
Normal file
30
Gemfile
Normal file
@ -0,0 +1,30 @@
|
||||
source 'https://rubygems.org'
|
||||
|
||||
group :development, :test do
|
||||
gem 'puppetlabs_spec_helper', :require => false
|
||||
|
||||
gem 'metadata-json-lint'
|
||||
# This is nice and all, but let's not worry about it until we've actually
|
||||
# got puppet 4.x sorted
|
||||
# gem 'puppet-lint-param-docs'
|
||||
gem 'puppet-lint-absolute_classname-check'
|
||||
gem 'puppet-lint-absolute_template_path'
|
||||
gem 'puppet-lint-trailing_newline-check'
|
||||
|
||||
# Puppet 4.x related lint checks
|
||||
gem 'puppet-lint-unquoted_string-check'
|
||||
gem 'puppet-lint-empty_string-check'
|
||||
gem 'puppet-lint-leading_zero-check'
|
||||
gem 'puppet-lint-variable_contains_upcase'
|
||||
gem 'puppet-lint-spaceship_operator_without_tag-check'
|
||||
gem 'puppet-lint-undef_in_function-check'
|
||||
|
||||
if puppetversion = ENV['PUPPET_GEM_VERSION']
|
||||
gem 'puppet', puppetversion, :require => false
|
||||
else
|
||||
gem 'puppet', '~> 3.0', :require => false
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
# vim:ft=ruby
|
@ -18,14 +18,14 @@
|
||||
#
|
||||
class elastic_recheck::bot (
|
||||
$gerrit_host,
|
||||
$gerrit_ssh_host_key = '',
|
||||
$gerrit_ssh_host_key = undef,
|
||||
$recheck_gerrit_user = 'elasticrecheck',
|
||||
$recheck_ssh_private_key = '',
|
||||
$recheck_ssh_public_key = '',
|
||||
$recheck_ssh_private_key = undef,
|
||||
$recheck_ssh_public_key = undef,
|
||||
$recheck_bot_passwd,
|
||||
$recheck_bot_nick,
|
||||
) {
|
||||
include elastic_recheck
|
||||
include ::elastic_recheck
|
||||
|
||||
file { '/etc/elastic-recheck/elastic-recheck.conf':
|
||||
ensure => present,
|
||||
@ -52,7 +52,7 @@ class elastic_recheck::bot (
|
||||
require => Class['elastic_recheck'],
|
||||
}
|
||||
|
||||
if $recheck_ssh_private_key != '' {
|
||||
if $recheck_ssh_private_key != undef {
|
||||
file { '/home/recheck/.ssh/id_rsa':
|
||||
owner => 'recheck',
|
||||
group => 'recheck',
|
||||
@ -63,7 +63,7 @@ class elastic_recheck::bot (
|
||||
}
|
||||
}
|
||||
|
||||
if $recheck_ssh_public_key != '' {
|
||||
if $recheck_ssh_public_key != undef {
|
||||
file { '/home/recheck/.ssh/id_rsa.pub':
|
||||
owner => 'recheck',
|
||||
group => 'recheck',
|
||||
@ -74,7 +74,7 @@ class elastic_recheck::bot (
|
||||
}
|
||||
}
|
||||
|
||||
if $gerrit_ssh_host_key != '' {
|
||||
if $gerrit_ssh_host_key != undef {
|
||||
file { '/home/recheck/.ssh/known_hosts':
|
||||
owner => 'recheck',
|
||||
group => 'recheck',
|
||||
|
@ -46,7 +46,7 @@ class elastic_recheck (
|
||||
source => 'https://git.openstack.org/openstack-infra/elastic-recheck',
|
||||
}
|
||||
|
||||
include pip
|
||||
include ::pip
|
||||
exec { 'install_elastic-recheck' :
|
||||
command => 'pip install /opt/elastic-recheck',
|
||||
path => '/usr/local/bin:/usr/bin:/bin/',
|
||||
|
Loading…
Reference in New Issue
Block a user