Skip to content

Commit

Permalink
Fixes #29195 - puppet-certs should run on el8
Browse files Browse the repository at this point in the history
  • Loading branch information
wbclark committed Apr 2, 2020
1 parent 167d53c commit eefd80a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions .sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.travis.yml:
beaker_sets:
- centos7-64
- centos8-64
test_all_rvms: false
Rakefile:
param_docs_pattern:
Expand Down
22 changes: 22 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,27 @@ matrix:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet5
- BEAKER_setfile=centos8-64{hostname=centos8-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

- rvm: 2.5.1
env:
- BEAKER_PUPPET_COLLECTION=puppet6
- BEAKER_setfile=centos8-64{hostname=centos8-64.example.com}
script: bundle exec rake beaker
services: docker
bundler_args: --without development
before_install:
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart

bundler_args: --without system_tests development
dist: xenial
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ gem 'beaker-docker', {"groups"=>["system_tests"]}
gem 'beaker-hostgenerator', '>= 1.1.10', {"groups"=>["system_tests"]}
gem 'beaker-puppet', {"groups"=>["system_tests"]}
gem 'beaker-rspec', {"groups"=>["system_tests"]}
gem 'beaker-vagrant', {"groups"=>["system_tests"]}
gem 'beaker-module_install_helper', {"groups"=>["system_tests"]}
gem 'beaker-puppet_install_helper', {"groups"=>["system_tests"]}
gem 'metadata-json-lint'
Expand Down
16 changes: 14 additions & 2 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,26 @@
c.before :suite do
# Install module and dependencies
hosts.each do |host|
if fact_on(host, 'osfamily') == 'RedHat'
if fact_on(host, 'os.family') == 'RedHat'
# don't delete downloaded rpm for use with BEAKER_provision=no +
# BEAKER_destroy=no
on host, 'sed -i "s/keepcache=.*/keepcache=1/" /etc/yum.conf'
# refresh check if cache needs refresh on next yum command
on host, 'yum clean expire-cache'

major = fact_on(host, 'os.release.major')

if major == '8'
on host, puppet('resource', 'package', 'glibc-langpack-en', 'ensure=installed')
end
# foreman nightly provides katello-cert-tools
host.install_package('https://yum.theforeman.org/releases/nightly/el7/x86_64/foreman-release.rpm')
baseurl = if ENV['FOREMAN_REPO_RELEASE']
"https://yum.theforeman.org/releases/nightly/el#{major}/x86_64/"
else
"http://koji.katello.org/releases/yum/foreman-nightly/RHEL/#{major}/x86_64/"
end

on host, puppet_resource('yumrepo', 'foreman', "baseurl=#{baseurl}", 'gpgcheck=0')
end
end
end
Expand Down

0 comments on commit eefd80a

Please sign in to comment.