(QENG-3888) Remove static nodeset, use beaker-hostgenerator
This is additional work for QENG-3888 in ci-job-configs. We were using static nodesets within specs/acceptance/nodesets before and this commit will instead use beaker-hostgenerator to get the specified platform .yml configurations.
This commit is contained in:
parent
eaee88b8f8
commit
c6de41e6b9
1
Gemfile
1
Gemfile
|
@ -24,6 +24,7 @@ end
|
||||||
group :acceptance do
|
group :acceptance do
|
||||||
gem 'beaker'
|
gem 'beaker'
|
||||||
gem 'beaker-rspec'
|
gem 'beaker-rspec'
|
||||||
|
gem 'beaker-hostgenerator'
|
||||||
end
|
end
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
|
|
17
Rakefile
17
Rakefile
|
@ -18,6 +18,23 @@ task :validate do
|
||||||
end
|
end
|
||||||
|
|
||||||
task :acceptance do
|
task :acceptance do
|
||||||
|
require 'beaker-hostgenerator'
|
||||||
|
|
||||||
|
target = ENV['platform']
|
||||||
|
if ! target
|
||||||
|
STDERR.puts 'TEST_TARGET environment variable is not set'
|
||||||
|
STDERR.puts 'setting to default value of "centos7-64ma."'
|
||||||
|
target = 'centos7-64ma.'
|
||||||
|
end
|
||||||
|
|
||||||
|
cli = BeakerHostGenerator::CLI.new([target])
|
||||||
|
nodeset_dir = "spec/acceptance/nodesets"
|
||||||
|
nodeset = "#{nodeset_dir}/#{target}.yml"
|
||||||
|
FileUtils.mkdir_p(nodeset_dir)
|
||||||
|
File.open(nodeset, 'w') do |fh|
|
||||||
|
fh.print(cli.execute)
|
||||||
|
end
|
||||||
|
puts nodeset
|
||||||
sh "gem build puppet-strings.gemspec"
|
sh "gem build puppet-strings.gemspec"
|
||||||
sh "puppet module build spec/unit/puppet/examples/test"
|
sh "puppet module build spec/unit/puppet/examples/test"
|
||||||
sh "BEAKER_set=#{ENV["platform"]} rspec spec/acceptance/*.rb"
|
sh "BEAKER_set=#{ENV["platform"]} rspec spec/acceptance/*.rb"
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
---
|
|
||||||
HOSTS:
|
|
||||||
centos7-64-1:
|
|
||||||
pe_dir:
|
|
||||||
pe_ver:
|
|
||||||
pe_upgrade_dir:
|
|
||||||
pe_upgrade_ver:
|
|
||||||
hypervisor: vmpooler
|
|
||||||
platform: el-7-x86_64
|
|
||||||
template: centos-7-x86_64
|
|
||||||
roles:
|
|
||||||
- agent
|
|
||||||
- master
|
|
||||||
CONFIG:
|
|
||||||
nfs_server: none
|
|
||||||
consoleport: 443
|
|
||||||
pooling_api: http://vmpooler.delivery.puppetlabs.net/
|
|
Loading…
Reference in New Issue