summaryrefslogtreecommitdiff
path: root/Rakefile
diff options
context:
space:
mode:
authorTP Honey <tphoney@users.noreply.github.com>2016-04-07 16:01:25 +0100
committerTP Honey <tphoney@users.noreply.github.com>2016-04-07 16:01:25 +0100
commit0624c3f8060deb6469046d13008a8fc605a72faa (patch)
tree0ded46e239e54520d889d51555ebb238c6dbfbfc /Rakefile
parentc5486aba6284664ae87a65beaa011211c70ea03e (diff)
parent5639828bffd1beb0e44e59554e17c1a891924145 (diff)
Merge pull request #589 from puppetlabs/modulesync-update
Multiple updates to stdlib and its testsuite
Diffstat (limited to 'Rakefile')
-rw-r--r--Rakefile41
1 files changed, 38 insertions, 3 deletions
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