Skip to content

Commit

Permalink
(PA-139) move common options out of Rakefile
Browse files Browse the repository at this point in the history
Many people run with beaker standalone. Common and required options have
been moved to the options files to support this workflow in this change.
We also move common options to their own file and load them into the
other options files that are loaded by beaker.

[skip ci]
  • Loading branch information
Eric Thompson committed Jan 2, 2016
1 parent 2fb1661 commit 452a304
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 21 deletions.
13 changes: 0 additions & 13 deletions acceptance/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,9 @@ EPEL_MIRROR = ENV['BEAKER_EPEL_MIRROR']

module HarnessOptions
defaults = {
:type => 'git',
:helper => ['lib/helper.rb'],
:tests => ['tests'],
:log_level => 'debug',
:color => false,
:root_keys => true,
:ssh => {
:keys => ["id_rsa_acceptance", "#{ENV['HOME']}/.ssh/id_rsa-acceptance"],
},
:xml => true,
:timesync => false,
:repo_proxy => true,
:add_el_extras => true,
:preserve_hosts => 'onfail',
:forge_host => 'forge-aio01-petest.puppetlabs.com',
:'master-start-curl-retries' => 30
}

DEFAULTS = EPEL_MIRROR ? defaults.merge(:epel_url => EPEL_MIRROR) : defaults
Expand Down
8 changes: 2 additions & 6 deletions acceptance/config/aio/options.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
{
:type => 'aio',
:is_puppetserver => true,
:puppetservice => 'puppetserver',
:'puppetserver-confdir' => '/etc/puppetlabs/puppetserver/conf.d',
:restart_when_done => false,
:type => 'aio',
:pre_suite => [
'setup/common/pre-suite/000-delete-puppet-when-none.rb',
'setup/aio/pre-suite/010_Install.rb',
Expand All @@ -15,4 +11,4 @@
'setup/aio/pre-suite/045_EnsureMasterStartedOnPassenger.rb',
'setup/common/pre-suite/070_InstallCACerts.rb',
],
}
}.merge(eval File.read('config/common/options.rb'))
16 changes: 16 additions & 0 deletions acceptance/config/common/options.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
:ssh => {
:keys => ["id_rsa_acceptance", "#{ENV['HOME']}/.ssh/id_rsa-acceptance"],
},
:load_path => './lib',
:xml => true,
:timesync => false,
:repo_proxy => true,
:add_el_extras => true,
:forge_host => 'forge-aio01-petest.puppetlabs.com',
:'master-start-curl-retries' => 30,
:is_puppetserver => true,
:puppetservice => 'puppetserver',
:'puppetserver-confdir' => '/etc/puppetlabs/puppetserver/conf.d',
:restart_when_done => false,
}
2 changes: 1 addition & 1 deletion acceptance/config/gem/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
'setup/common/pre-suite/000-delete-puppet-when-none.rb',
'setup/git/pre-suite/000_EnvSetup.rb',
],
}
}.merge(eval File.read('config/common/options.rb'))
2 changes: 1 addition & 1 deletion acceptance/config/git/options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
'setup/git/pre-suite/060_InstallModules.rb',
'setup/common/pre-suite/070_InstallCACerts.rb',
],
}
}.merge(eval File.read('config/common/options.rb'))

0 comments on commit 452a304

Please sign in to comment.