From ad7d12e460599995b5b53b9d05881a9a547425d0 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Mon, 1 Jun 2015 12:21:59 +0100 Subject: Remove duplicate rake task and enable metadata.json linting The :validate task is already provided by puppetlabs_spec_helper/rake_tasks and would check files twice. The metadata.json linting is just good form. --- Rakefile | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 4ed1327..13ee3d9 100644 --- a/Rakefile +++ b/Rakefile @@ -4,15 +4,3 @@ require 'puppet-lint/tasks/puppet-lint' PuppetLint.configuration.send('disable_80chars') PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] -desc "Validate manifests, templates, and ruby files in lib." -task :validate do - Dir['manifests/**/*.pp'].each do |manifest| - sh "puppet parser validate --noop #{manifest}" - end - Dir['lib/**/*.rb'].each do |lib_file| - sh "ruby -c #{lib_file}" - end - Dir['templates/**/*.erb'].each do |template| - sh "erb -P -x -T '-' #{template} | ruby -c" - end -end -- cgit v1.2.3 From f3e79ddcd56a221c7799b35efde7e9803a5c7923 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Mon, 1 Jun 2015 12:21:59 +0100 Subject: Convert tests to use plain rspec-puppet Tests in the new style produces the following documentation output: abs should not eq nil should run abs() and raise an Puppet::ParseError should run abs(-34) and return 34 should run abs("-34") and return 34 should run abs(34) and return 34 should run abs("34") and return 34 --- Rakefile | 1 + 1 file changed, 1 insertion(+) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 13ee3d9..e136b8e 100644 --- a/Rakefile +++ b/Rakefile @@ -1,4 +1,5 @@ require 'rubygems' +# keep for compatibility for now require 'puppetlabs_spec_helper/rake_tasks' require 'puppet-lint/tasks/puppet-lint' PuppetLint.configuration.send('disable_80chars') -- cgit v1.2.3 From 27458aff988aac083007a677793081568356d85d Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Tue, 5 Apr 2016 14:32:06 +0100 Subject: (maint) Update to current modulesync_configs [953280c] This removes much of the assorted cruft that accumulated in the unmanaged files and moves the remaining necessary parts to spec_helper_local. --- Rakefile | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index e136b8e..7e9a13d 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,42 @@ -require 'rubygems' -# keep for compatibility for now -require 'puppetlabs_spec_helper/rake_tasks' +require 'puppet_blacksmith/rake_tasks' require 'puppet-lint/tasks/puppet-lint' +require 'puppetlabs_spec_helper/rake_tasks' + +PuppetLint.configuration.fail_on_warnings = true +PuppetLint.configuration.send('relative') PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_class_inherits_from_params_class') +PuppetLint.configuration.send('disable_documentation') +PuppetLint.configuration.send('disable_single_quote_string_with_variables') PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] +desc 'Generate pooler nodesets' +task :gen_nodeset do + require 'beaker-hostgenerator' + require 'securerandom' + require 'fileutils' + + agent_target = ENV['TEST_TARGET'] + if ! agent_target + STDERR.puts 'TEST_TARGET environment variable is not set' + STDERR.puts 'setting to default value of "redhat-64default."' + agent_target = 'redhat-64default.' + end + + master_target = ENV['MASTER_TEST_TARGET'] + if ! master_target + STDERR.puts 'MASTER_TEST_TARGET environment variable is not set' + STDERR.puts 'setting to default value of "redhat7-64mdcl"' + master_target = 'redhat7-64mdcl' + end + + targets = "#{master_target}-#{agent_target}" + cli = BeakerHostGenerator::CLI.new([targets]) + nodeset_dir = "tmp/nodesets" + nodeset = "#{nodeset_dir}/#{targets}-#{SecureRandom.uuid}.yaml" + FileUtils.mkdir_p(nodeset_dir) + File.open(nodeset, 'w') do |fh| + fh.print(cli.execute) + end + puts nodeset +end -- cgit v1.2.3 From 098e82e694704222200d42f2dd4b50ca6d9999fa Mon Sep 17 00:00:00 2001 From: tphoney Date: Tue, 28 Jun 2016 16:36:03 +0100 Subject: {maint} modulesync changes for puppet-lint 2.0.0 --- Rakefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 7e9a13d..3b07e4d 100644 --- a/Rakefile +++ b/Rakefile @@ -4,11 +4,11 @@ require 'puppetlabs_spec_helper/rake_tasks' PuppetLint.configuration.fail_on_warnings = true PuppetLint.configuration.send('relative') -PuppetLint.configuration.send('disable_80chars') +PuppetLint.configuration.send('disable_char_check') PuppetLint.configuration.send('disable_class_inherits_from_params_class') PuppetLint.configuration.send('disable_documentation') PuppetLint.configuration.send('disable_single_quote_string_with_variables') -PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"] +PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "bundle/**/*", "vendor/**/*"] desc 'Generate pooler nodesets' task :gen_nodeset do -- cgit v1.2.3 From d401d7f252effa259b976eb30a3effd6d3600a6d Mon Sep 17 00:00:00 2001 From: tphoney Date: Wed, 29 Jun 2016 10:42:31 +0100 Subject: {maint} modulesync 0794b2c --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 3b07e4d..8906d23 100644 --- a/Rakefile +++ b/Rakefile @@ -4,7 +4,7 @@ require 'puppetlabs_spec_helper/rake_tasks' PuppetLint.configuration.fail_on_warnings = true PuppetLint.configuration.send('relative') -PuppetLint.configuration.send('disable_char_check') +PuppetLint.configuration.send('disable_140chars') PuppetLint.configuration.send('disable_class_inherits_from_params_class') PuppetLint.configuration.send('disable_documentation') PuppetLint.configuration.send('disable_single_quote_string_with_variables') -- cgit v1.2.3 From 6e7e69fe203e042b28aacb01301c338d55448c5f Mon Sep 17 00:00:00 2001 From: tphoney Date: Wed, 3 Aug 2016 17:06:25 +0100 Subject: (modules-3533) deprecation for 3.x number function --- Rakefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 8906d23..47a671e 100644 --- a/Rakefile +++ b/Rakefile @@ -8,7 +8,11 @@ PuppetLint.configuration.send('disable_140chars') PuppetLint.configuration.send('disable_class_inherits_from_params_class') PuppetLint.configuration.send('disable_documentation') PuppetLint.configuration.send('disable_single_quote_string_with_variables') -PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "bundle/**/*", "vendor/**/*"] +PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "bundle/**/*", "vendor/**/*", "types/**/*"] + +if Puppet.version.to_f < 4.0 + PuppetSyntax.exclude_paths << "types/**/*" +end desc 'Generate pooler nodesets' task :gen_nodeset do -- cgit v1.2.3 From 43d634fc85a5d1759b1dba0a858d80bca378c758 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Fri, 26 Aug 2016 09:28:58 +0200 Subject: Update modulesync_config [a3fe424] --- Rakefile | 8 -------- 1 file changed, 8 deletions(-) (limited to 'Rakefile') diff --git a/Rakefile b/Rakefile index 47a671e..3e8d4cb 100644 --- a/Rakefile +++ b/Rakefile @@ -2,17 +2,9 @@ require 'puppet_blacksmith/rake_tasks' require 'puppet-lint/tasks/puppet-lint' require 'puppetlabs_spec_helper/rake_tasks' -PuppetLint.configuration.fail_on_warnings = true PuppetLint.configuration.send('relative') -PuppetLint.configuration.send('disable_140chars') -PuppetLint.configuration.send('disable_class_inherits_from_params_class') PuppetLint.configuration.send('disable_documentation') PuppetLint.configuration.send('disable_single_quote_string_with_variables') -PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp", "bundle/**/*", "vendor/**/*", "types/**/*"] - -if Puppet.version.to_f < 4.0 - PuppetSyntax.exclude_paths << "types/**/*" -end desc 'Generate pooler nodesets' task :gen_nodeset do -- cgit v1.2.3