Skip to content

Commit

Permalink
use docker_exp, and clean code
Browse files Browse the repository at this point in the history
  • Loading branch information
tphoney committed Jun 7, 2019
1 parent 4492489 commit 8630254
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 27 deletions.
35 changes: 31 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ matrix:
-
bundler_args:
dist: trusty
env: PLATFORMS=el_puppet5
env: PLATFORMS=el6_puppet5
rvm: 2.5.1
before_script:
- bundle exec rake 'litmus:provision_list[waffle_el]'
- bundle exec rake 'litmus:provision_list[waffle_el6]'
- bundle exec rake 'litmus:install_agent[puppet5]'
- bundle exec rake litmus:install_module
script:
Expand All @@ -64,16 +64,43 @@ matrix:
-
bundler_args:
dist: trusty
env: PLATFORMS=el_puppet6
env: PLATFORMS=el6_puppet6
rvm: 2.5.1
before_script:
- bundle exec rake 'litmus:provision_list[waffle_el]'
- bundle exec rake 'litmus:provision_list[waffle_el6]'
- bundle exec rake 'litmus:install_agent[puppet6]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
-
bundler_args:
dist: trusty
env: PLATFORMS=el7_puppet5
rvm: 2.5.1
before_script:
- bundle exec rake 'litmus:provision_list[waffle_el7]'
- bundle exec rake 'litmus:install_agent[puppet5]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required
-
bundler_args:
dist: trusty
env: PLATFORMS=el7_puppet6
rvm: 2.5.1
before_script:
- bundle exec rake 'litmus:provision_list[waffle_el7]'
- bundle exec rake 'litmus:install_agent[puppet6]'
- bundle exec rake litmus:install_module
script:
- bundle exec rake litmus:acceptance:parallel
services: docker
sudo: required

-
env: CHECK="check:symlinks check:git_ignore check:dot_underscore check:test_file rubocop syntax lint metadata_lint"
stage: static
Expand Down
19 changes: 8 additions & 11 deletions provision.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
---
default:
provisioner: docker
provisioner: docker_exp
images: ['waffleimage/centos7']
travis_deb:
provisioner: docker
images: ['debian:8', 'debian:9', 'ubuntu:14.04', 'ubuntu:16.04', 'ubuntu:18.04']
waffle_deb:
provisioner: docker
provisioner: docker_exp
images: ['waffleimage/debian8', 'waffleimage/debian9', 'waffleimage/ubuntu14.04', 'waffleimage/ubuntu16.04', 'waffleimage/ubuntu18.04']
travis_el:
provisioner: docker
images: ['centos:6', 'centos:7', 'oraclelinux:6', 'oraclelinux:7', 'scientificlinux/sl:6', 'scientificlinux/sl:7']
waffle_el:
provisioner: docker
images: ['waffleimage/centos6', 'waffleimage/centos7', 'waffleimage/oraclelinux6', 'waffleimage/oraclelinux7', 'waffleimage/scientificlinux6', 'waffleimage/scientificlinux7']
waffle_el6:
provisioner: docker_exp
images: ['waffleimage/centos6', 'waffleimage/scientificlinux6']
waffle_el7:
provisioner: docker_exp
images: ['waffleimage/centos7', 'waffleimage/oraclelinux7', 'waffleimage/scientificlinux7']
release_checks:
provisioner: vmpooler
images: ['redhat-5-x86_64', 'redhat-6-x86_64', 'redhat-7-x86_64', 'centos-5-x86_64', 'centos-6-x86_64', 'centos-7-x86_64', 'oracle-5-x86_64', 'oracle-6-x86_64', 'oracle-7-x86_64', 'scientific-6-x86_64', 'scientific-7-x86_64', 'debian-8-x86_64', 'debian-9-x86_64', 'sles-11-x86_64', 'sles-12-x86_64', 'sles-15-x86_64', 'ubuntu-1404-x86_64', 'ubuntu-1604-x86_64', 'ubuntu-1804-x86_64']
3 changes: 1 addition & 2 deletions spec/acceptance/ntp_parameters_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'/etc/ntp.conf'
end

modulepath = run_shell('puppet config print modulepath').stdout.split(':')[0]
describe 'ntp class', unless: UNSUPPORTED_PLATFORMS.include?(os[:family]) do
it 'applies successfully' do
pp = "class { 'ntp': }"
Expand All @@ -45,7 +46,6 @@

describe 'config_template' do
before :all do
modulepath = run_shell('puppet config print modulepath').stdout.split(':')[0]
run_shell("mkdir -p #{modulepath}/test/templates")
# Add spurious template logic to verify the use of the correct template rendering engine
run_shell("echo '<% [1].each do |i| %>erbserver<%= i %><%end %>' >> #{modulepath}/test/templates/ntp.conf.erb")
Expand All @@ -66,7 +66,6 @@

describe 'config_epp' do
before :all do
modulepath = run_shell('puppet config print modulepath').stdout.split(':')[0]
run_shell("mkdir -p #{modulepath}/test/templates")
# Add spurious template logic to verify the use of the correct template rendering engine
run_shell("echo '<% [1].each |$i| { -%>eppserver<%= $i %><% } -%>' >> #{modulepath}/test/templates/ntp.conf.epp")
Expand Down
10 changes: 0 additions & 10 deletions spec/spec_helper_acceptance_local.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
# frozen_string_literal: true

UNSUPPORTED_PLATFORMS = ['windows', 'darwin'].freeze

def disable_ntp_update_from_dhcp
# Need to disable update of ntp servers from DHCP, as subsequent restart of ntp causes test failures
if os[:family] == 'debian'
run_shell('dpkg-divert --divert /etc/dhcp-ntp.bak --local --rename --add /etc/dhcp/dhclient-exit-hooks.d/ntp')
run_shell('dpkg-divert --divert /etc/dhcp3-ntp.bak --local --rename --add /etc/dhcp3/dhclient-exit-hooks.d/ntp')
elsif os[:family] == 'redhat'
run_shell('echo "PEERNTP=no" >> /etc/sysconfig/network')
end
end

0 comments on commit 8630254

Please sign in to comment.