Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak committed Feb 17, 2024
1 parent cef8e46 commit 1484a93
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
cache-version: ${{ inputs.cache-version }}
working-directory: ${{ inputs.working-directory }}
- name: Run beaker
run: bundle exec beaker --provision --preserve-hosts always --hosts ${{ matrix.env.BEAKER_SETFILE }}{tag=${{ github.repository_name }}} --log-level debug --helper spec/spec_helper_acceptance.rb
run: bundle exec beaker --provision --preserve-hosts always --hosts ${{ matrix.env.BEAKER_SETFILE }}{tag=${{ github.repository_name }}} --log-level debug --helper install_puppet.rb
# run: bundle exec rake beaker
env: ${{ matrix.env }}
- name: List images
Expand Down
20 changes: 20 additions & 0 deletions install_puppet.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# frozen_string_literal: true

# this is inspired by https://github.com/voxpupuli/voxpupuli-acceptance/blob/397055f9d9ff1d7da17a7955430ddcf35619d641/lib/voxpupuli/acceptance/spec_helper_acceptance.rb

require 'beaker_puppet_helpers'
require 'beaker-rspec'

collection = ENV['BEAKER_PUPPET_COLLECTION'] || 'puppet'

block_on hosts, run_in_parallel: true do |host|
unless %w[none preinstalled].include?(collection)
BeakerPuppetHelpers::InstallUtils.install_puppet_release_repo_on(host, collection)
end
package_name = ENV.fetch('BEAKER_PUPPET_PACKAGE_NAME', BeakerPuppetHelpers::InstallUtils.puppet_package_name(host, prefer_aio: collection != 'none'))
host.install_package(package_name)

# by default, puppet-agent creates /etc/profile.d/puppet-agent.sh which adds /opt/puppetlabs/bin to PATH
# in our non-interactive ssh sessions we manipulate PATH in ~/.ssh/environment, we need to do this step here as well
host.add_env_var('PATH', '/opt/puppetlabs/bin')
end
4 changes: 0 additions & 4 deletions spec/acceptance/dummy_spec.rb

This file was deleted.

0 comments on commit 1484a93

Please sign in to comment.