Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(maint): Added support for v2 agent download url #283

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 Gem::Version.new(pe_ver) > Gem::Version.new('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