Permalink
Comparing changes
Open a pull request
- 3 commits
- 3 files changed
- 0 commit comments
- 2 contributors
Unified
Split
Showing
with
38 additions
and 45 deletions.
- +3 −3 acceptance/Gemfile
- +34 −41 acceptance/lib/puppet/acceptance/install_utils.rb
- +1 −1 acceptance/setup/aio/pre-suite/010_Install.rb
| @@ -12,9 +12,9 @@ def location_for(place, fake_version = nil) | ||
| end | ||
| end | ||
| gem "beaker", *location_for(ENV['BEAKER_VERSION'] || "~> 3.24") | ||
| gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'] || "~> 1.1") | ||
| gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || "~> 0.3") | ||
| gem "beaker", *location_for(ENV['BEAKER_VERSION'] || "~> 3.6") | ||
| gem "beaker-hostgenerator", *location_for(ENV['BEAKER_HOSTGENERATOR_VERSION'] || "~> 0.8") | ||
| gem "beaker-abs", *location_for(ENV['BEAKER_ABS_VERSION'] || "~> 0.2") | ||
| gem "rake" | ||
| gem "httparty", :require => false | ||
| gem 'uuidtools', :require => false | ||
| @@ -119,51 +119,44 @@ def stop_firewall_on(host) | ||
| def install_repos_on(host, project, sha, repo_configs_dir) | ||
| platform = host['platform'].with_version_codename | ||
| platform_configs_dir = File.join(repo_configs_dir,platform) | ||
| dev_builds_url = ENV['DEV_BUILDS_URL'] || 'https://builds.delivery.puppetlabs.net' | ||
| tld = sha == 'nightly' ? 'https://nightlies.puppetlabs.com' : dev_builds_url | ||
| tld = sha == 'nightly' ? 'nightlies.puppetlabs.com' : 'builds.puppetlabs.lan' | ||
| project = sha == 'nightly' ? project + '-latest' : project | ||
| sha = sha == 'nightly' ? nil : sha | ||
| if sha.nil? | ||
| case platform | ||
| when /^(fedora|el|centos)-(\d+)-(.+)$/ | ||
| variant = (($1 == 'centos') ? 'el' : $1) | ||
| fedora_prefix = ((variant == 'fedora') ? 'f' : '') | ||
| version = $2 | ||
| arch = $3 | ||
| repo_filename = "pl-%s%s-%s-%s%s-%s.repo" % [ | ||
| project, | ||
| sha ? '-' + sha : '', | ||
| variant, | ||
| fedora_prefix, | ||
| version, | ||
| arch | ||
| ] | ||
| repo_url = "%s/%s/%s/repo_configs/rpm/%s" % [tld, project, sha, repo_filename] | ||
| on host, "curl -o /etc/yum.repos.d/#{repo_filename} #{repo_url}" | ||
| when /^(debian|ubuntu)-([^-]+)-(.+)$/ | ||
| variant = $1 | ||
| version = $2 | ||
| arch = $3 | ||
| list_filename = "pl-%s%s-%s.list" % [ | ||
| project, | ||
| sha ? '-' + sha : '', | ||
| version | ||
| ] | ||
| list_url = "%s/%s/%s/repo_configs/deb/%s" % [tld, project, sha, list_filename] | ||
| on host, "curl -o /etc/apt/sources.list.d/#{list_filename} #{list_url}" | ||
| on host, "apt-get update" | ||
| else | ||
| host.logger.notify("No repository installation step for #{platform} yet...") | ||
| end | ||
| case platform | ||
| when /^(fedora|el|centos)-(\d+)-(.+)$/ | ||
| variant = (($1 == 'centos') ? 'el' : $1) | ||
| fedora_prefix = ((variant == 'fedora') ? 'f' : '') | ||
| version = $2 | ||
| arch = $3 | ||
| repo_filename = "pl-%s%s-%s-%s%s-%s.repo" % [ | ||
| project, | ||
| sha ? '-' + sha : '', | ||
| variant, | ||
| fedora_prefix, | ||
| version, | ||
| arch | ||
| ] | ||
| repo_url = "http://%s/%s/%s/repo_configs/rpm/%s" % [tld, project, sha, repo_filename] | ||
| on host, "curl -o /etc/yum.repos.d/#{repo_filename} #{repo_url}" | ||
| when /^(debian|ubuntu)-([^-]+)-(.+)$/ | ||
| variant = $1 | ||
| version = $2 | ||
| arch = $3 | ||
| list_filename = "pl-%s%s-%s.list" % [ | ||
| project, | ||
| sha ? '-' + sha : '', | ||
| version | ||
| ] | ||
| list_url = "http://%s/%s/%s/repo_configs/deb/%s" % [tld, project, sha, list_filename] | ||
| on host, "curl -o /etc/apt/sources.list.d/#{list_filename} #{list_url}" | ||
| on host, "apt-get update" | ||
| else | ||
| base_url, build_details = fetch_build_details("#{tld}/#{project}/#{sha}/artifacts/#{sha}.yaml") | ||
| _, repoconfig_url = host_urls(host, build_details, base_url) | ||
| install_repo_configs_on(host, repoconfig_url) | ||
| host.logger.notify("No repository installation step for #{platform} yet...") | ||
| end | ||
| end | ||
| @@ -69,7 +69,7 @@ | ||
| agents.each do |agent| | ||
| if agent['platform'] =~ /windows/ | ||
| arch = agent[:ruby_arch] || 'x86' | ||
| base_url = ENV['MSI_BASE_URL'] || "http://builds.delivery.puppetlabs.net/puppet-agent/#{ENV['SHA']}/artifacts/windows" | ||
| base_url = ENV['MSI_BASE_URL'] || "http://builds.puppetlabs.lan/puppet-agent/#{ENV['SHA']}/artifacts/windows" | ||
| filename = ENV['MSI_FILENAME'] || "puppet-agent-#{arch}.msi" | ||
| install_puppet_from_msi(agent, :url => "#{base_url}/#{filename}") | ||