Skip to content

Commit e8dc7ba

Browse files
committed
Implement support for installing staging packages
1 parent fc04e2b commit e8dc7ba

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/voxpupuli/acceptance/spec_helper_acceptance.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
def configure_beaker(modules: :metadata, &block)
77
collection = ENV['BEAKER_PUPPET_COLLECTION'] || 'openvox8'
8+
staging_url = ENV['BEAKER_STAGING_URL'] || 'https://artifacts.voxpupuli.org/openvox-agent'
9+
staging_version = ENV.fetch('BEAKER_STAGING_VERSION', nil)
810
ENV['BEAKER_DEBUG'] ||= 'true'
911
ENV['BEAKER_HYPERVISOR'] ||= 'docker'
1012

@@ -18,7 +20,11 @@ def configure_beaker(modules: :metadata, &block)
1820

1921
unless ENV['BEAKER_PROVISION'] == 'no'
2022
block_on hosts, run_in_parallel: true do |host|
21-
if collection != 'preinstalled'
23+
if collection == 'staging'
24+
raise Exception "staging server '#{staging_url}' configured, but no BEAKER_STAGING_VERSION environment variable set" unless staging_version
25+
26+
BeakerPuppetHelpers::InstallUtils.install_openvox_agent_from_url_on(host, staging_url, staging_version)
27+
elsif collection != 'preinstalled'
2228
if collection != 'none'
2329
BeakerPuppetHelpers::InstallUtils.install_puppet_release_repo_on(host, collection)
2430
end

0 commit comments

Comments
 (0)