Manage default configs
Add default config for Gemfile, puppet-lint disabled checks, nodepool files for centos7 and trusty, and a sample modulesync.yaml for configuring msync. Co-Authored-By: Cody Herries <cody@puppetlabs.com> Change-Id: Ib00a5b3b9c62f063b0b88b2d883e0ebad6506840
This commit is contained in:
parent
361463e2ef
commit
a0841c293e
26
config_defaults.yml
Normal file
26
config_defaults.yml
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
Gemfile:
|
||||
required:
|
||||
':development, :test':
|
||||
- gem: puppetlabs_spec_helper
|
||||
- gem: rspec-puppet
|
||||
version: '~> 2.1.0'
|
||||
- gem: metadata-json-lint
|
||||
- gem: puppet-lint-param-docs
|
||||
- gem: puppet-lint-absolute_classname-check
|
||||
- gem: puppet-lint-absolute_template_path
|
||||
- gem: puppet-lint-trailing_newline-check
|
||||
- gem: puppet-lint-unquoted_string-check
|
||||
- gem: puppet-lint-leading_zero-check
|
||||
- gem: puppet-lint-variable_contains_upcase
|
||||
- gem: puppet-lint-numericvariable
|
||||
- gem: json
|
||||
- gem: webmock
|
||||
':system_tests':
|
||||
- gem: beaker-rspec
|
||||
Rakefile:
|
||||
default_disabled_lint_checks:
|
||||
- '80chars'
|
||||
- 'class_inherits_from_params_class'
|
||||
- 'class_parameter_defaults'
|
||||
- 'only_variable_string'
|
@ -11,6 +11,7 @@ group <%= group %> do
|
||||
<% { -%>
|
||||
<% 'gem' => gem['gem'], -%>
|
||||
<% 'version' => gem['version'], -%>
|
||||
<% 'require' => gem['require'], -%>
|
||||
<% 'git' => gem['git'], -%>
|
||||
<% 'branch' => gem['branch'], -%>
|
||||
<% 'length' => gem['gem'].length + (("', '".length if gem['version']) || 0) + gem['version'].to_s.length -%>
|
||||
@ -19,7 +20,7 @@ group <%= group %> do
|
||||
<% gem['length'] -%>
|
||||
<% end.max -%>
|
||||
<% gems.each do |gem| -%>
|
||||
gem '<%= gem['gem'] %>'<%= ", '#{gem['version']}'" if gem['version'] %>, <%= ' ' * (maxlen - gem['length']) %> :require => false<%= ", :git => '#{gem['git']}'" if gem['git'] %><%= ", :branch => '#{gem['branch']}'" if gem['branch'] %>
|
||||
gem '<%= gem['gem'] %>'<%= ", '#{gem['version']}'" if gem['version'] %>, <%= ' ' * (maxlen - gem['length']) %><%= ":require => '#{gem['require'] || false}'" %><%= ", :git => '#{gem['git']}'" if gem['git'] %><%= ", :branch => '#{gem['branch']}'" if gem['branch'] %>
|
||||
<% end -%>
|
||||
end
|
||||
|
||||
|
@ -12,7 +12,7 @@ PuppetLint::RakeTask.new :lint do |config|
|
||||
config.ignore_paths = ["spec/**/*.pp", "vendor/**/*.pp"]
|
||||
config.fail_on_warnings = true
|
||||
config.log_format = '%{path}:%{linenumber}:%{KIND}: %{message}'
|
||||
config.disable_checks = <% @configs['default_disabled_lint_checks'] + ( @configs['extra_disabled_lint_checks'] || [] ) -%>
|
||||
config.disable_checks = <%= @configs['default_disabled_lint_checks'] + ( @configs['extra_disabled_lint_checks'] || [] ) %>
|
||||
end
|
||||
|
||||
desc "Run acceptance tests"
|
||||
|
10
moduleroot/spec/acceptance/nodesets/nodepool-centos7.yml
Normal file
10
moduleroot/spec/acceptance/nodesets/nodepool-centos7.yml
Normal file
@ -0,0 +1,10 @@
|
||||
HOSTS:
|
||||
centos-70-x64:
|
||||
roles:
|
||||
- master
|
||||
platform: el-7-x86_64
|
||||
hypervisor : none
|
||||
ip: 127.0.0.1
|
||||
CONFIG:
|
||||
type: foss
|
||||
set_env: false
|
@ -7,3 +7,4 @@ HOSTS:
|
||||
ip: 127.0.0.1
|
||||
CONFIG:
|
||||
type: foss
|
||||
set_env: false
|
@ -1,5 +1,6 @@
|
||||
require 'puppetlabs_spec_helper/module_spec_helper'
|
||||
require 'shared_examples'
|
||||
require 'webmock/rspec'
|
||||
|
||||
RSpec.configure do |c|
|
||||
c.alias_it_should_behave_like_to :it_configures, 'configures'
|
||||
|
7
modulesync.yml.sample
Normal file
7
modulesync.yml.sample
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
namespace: stackforge
|
||||
git_base: ssh://jdoe@review.openstack.org:29418/
|
||||
branch: msync_foo
|
||||
remote_branch: refs/publish/master/msync_foo
|
||||
# see https://github.com/puppet-community/modulesync/blob/master/contrib/openstack-commit-msg-hook.sh
|
||||
pre_commit_script: openstack-commit-msg-hook.sh
|
Loading…
x
Reference in New Issue
Block a user