Skip to content

Commit

Permalink
(maint): Added support for v2 agent download url
Browse files Browse the repository at this point in the history
  • Loading branch information
span786 committed Oct 16, 2024
1 parent dd9e1fc commit 8f9e571
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/beaker-pe/install/pe_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ def install_rpm_on_sles11_host(host, puppet_agent_ver, opts)
extension = ".rpm"
host.install_package_with_rpm("#{path}/#{filename}#{extension}")
end

#Determine the PE package to download/upload on a windows host, download/upload that package onto the host.
#Assumed file name format: puppet-enterprise-3.3.0-rc1-559-g97f0833.msi
# @param [Host] host The windows host to download/upload and unpack PE onto
Expand Down Expand Up @@ -1076,7 +1076,11 @@ def install_puppet_agent_pe_promoted_repo_on(hosts, opts)
pe_ver = host[:pe_ver] || opts[:pe_ver] || '4.0.0-rc1'
opts = sanitize_opts(opts)
opts[:download_url] =
"#{opts[:pe_promoted_builds_url]}/puppet-agent/#{pe_ver}/#{opts[:puppet_agent_version]}/repos"
if pe_ver > '2023.7.0'
"#{opts[:pe_promoted_builds_url]}/v2/agent/#{pe_ver}/#{opts[:puppet_agent_version]}/repos"
else
"#{opts[:pe_promoted_builds_url]}/puppet-agent/#{pe_ver}/#{opts[:puppet_agent_version]}/repos"
end
opts[:copy_base_local] ||= File.join('tmp', 'repo_configs')
opts[:copy_dir_external] ||= host.external_copy_base
opts[:puppet_collection] ||= puppet_collection_for(:puppet_agent, opts[:puppet_agent_version])
Expand Down

0 comments on commit 8f9e571

Please sign in to comment.