Skip to content

Commit

Permalink
Merge pull request #239 from puppetlabs/local_dev_build
Browse files Browse the repository at this point in the history
Add the ability to install puppet-agent from a local dev build
  • Loading branch information
mhashizume authored Feb 9, 2024
2 parents b2317c7 + 692a0e2 commit 8d11a6f
Showing 1 changed file with 22 additions and 8 deletions.
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

0 comments on commit 8d11a6f

Please sign in to comment.