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

Add the ability to install puppet-agent from a local dev build #239

Merged
merged 1 commit into from
Feb 9, 2024
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
30 changes: 22 additions & 8 deletions setup/aio/010_Install_Puppet_Agent.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
test_name 'Install Puppet Agent Packages' do
opts = {
nightly_builds_url: ENV.fetch('NIGHTLY_BUILDS_URL', nil),
dev_builds_url: ENV.fetch('DEV_BUILDS_URL', nil),
puppet_agent_version: ENV.fetch('SHA', nil),
puppet_collection: ENV.fetch('RELEASE_STREAM', nil),
}
agents.each do |agent|
path = ENV.fetch('DEV_BUILD_PATH', nil)
if path
raise ArgumentError, "The path #{path} does not exist" unless File.exist?(path)

basename = File.basename(path)
scp_to(agent, path, basename)

install_puppet_agent_on(hosts, opts)
# configure locations for ruby, puppet, config files, etc
add_aio_defaults_on(agent)
agent.install_package(basename)
else
opts = {
nightly_builds_url: ENV.fetch('NIGHTLY_BUILDS_URL', nil),
dev_builds_url: ENV.fetch('DEV_BUILDS_URL', nil),
puppet_agent_version: ENV.fetch('SHA', nil),
puppet_collection: ENV.fetch('RELEASE_STREAM', nil),
}

install_puppet_agent_on(hosts, opts)
end
end

# make sure install is sane, beaker has already added puppet and ruby
# to PATH in ~/.ssh/environment
agents.each do |agent|
agents.each do |agent| # rubocop:disable Style/CombinableLoops
on agent, puppet('--version')
ruby = ruby_command(agent)
on agent, "#{ruby} --version"
Expand Down