From 528dab4cc49ccbf522a1c91f7b09b841ffcb0103 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Sun, 13 May 2018 13:24:08 +0200 Subject: [PATCH] Rely on beaker-hostgenerator for docker nodesets --- .github/CONTRIBUTING.md | 19 +++++++++++-- .github/PULL_REQUEST_TEMPLATE.md | 12 ++++++++ .msync.yml | 2 +- .sync.yml | 6 ++-- .travis.yml | 28 +++++++++++-------- Gemfile | 15 +++++----- spec/acceptance/nodesets/docker/centos-5.yml | 19 ------------- spec/acceptance/nodesets/docker/centos-6.yml | 20 ------------- spec/acceptance/nodesets/docker/centos-7.yml | 19 ------------- spec/acceptance/nodesets/docker/debian-7.yml | 18 ------------ spec/acceptance/nodesets/docker/debian-8.yml | 20 ------------- spec/acceptance/nodesets/docker/debian-9.yml | 20 ------------- .../nodesets/docker/ubuntu-12.04.yml | 19 ------------- .../nodesets/docker/ubuntu-14.04.yml | 21 -------------- .../nodesets/docker/ubuntu-16.04.yml | 19 ------------- spec/acceptance/nodesets/fedora-25-x64.yml | 2 -- spec/default_facts.yml | 1 - spec/spec_helper.rb | 4 +++ 18 files changed, 62 insertions(+), 202 deletions(-) delete mode 100644 spec/acceptance/nodesets/docker/centos-5.yml delete mode 100644 spec/acceptance/nodesets/docker/centos-6.yml delete mode 100644 spec/acceptance/nodesets/docker/centos-7.yml delete mode 100644 spec/acceptance/nodesets/docker/debian-7.yml delete mode 100644 spec/acceptance/nodesets/docker/debian-8.yml delete mode 100644 spec/acceptance/nodesets/docker/debian-9.yml delete mode 100644 spec/acceptance/nodesets/docker/ubuntu-12.04.yml delete mode 100644 spec/acceptance/nodesets/docker/ubuntu-14.04.yml delete mode 100644 spec/acceptance/nodesets/docker/ubuntu-16.04.yml diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 7a0980a9..496a5c03 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -40,9 +40,24 @@ you must set an environment variable such as: export PUPPET_VERSION="~> 4.2.0" -Install the dependencies like so... +You can install all needed gems for spec tests into the modules directory by +running: - bundle install +```sh +bundle install --path .vendor/ --without development --without system_tests --without release +``` + +If you also want to run acceptance tests: + +```sh +bundle install --path .vendor/ --without development --with system_tests --without release +``` + +Our all in one solution if you don't know if you need to install or update gems: + +```sh +bundle install --path .vendor/ --without development --with system_tests --without release; bundle update; bundle clean +``` ## Syntax and style diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 66f80444..ef25cdbf 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,3 +6,15 @@ Thank you for contributing to this project! - Our vulnerabilities reporting process is at https://voxpupuli.org/security/ --> +#### Pull Request (PR) description + + +#### This Pull Request (PR) fixes the following issues + diff --git a/.msync.yml b/.msync.yml index 08e85ce0..1a132115 100644 --- a/.msync.yml +++ b/.msync.yml @@ -1 +1 @@ -modulesync_config_version: '1.6.0' +modulesync_config_version: '1.9.2' diff --git a/.sync.yml b/.sync.yml index 8a3413cb..c3a46973 100644 --- a/.sync.yml +++ b/.sync.yml @@ -2,6 +2,6 @@ .travis.yml: secure: "SCQpiBB9qpZAjBRk+b9D3cSCQfYpDgHPOdOc7djfGeB5yn1UbGg7uW1zshrshb4QMLfUgvsL4LsT0CYj7ilBerghgeySF5JWuZdk05W/7Iudls4btbxdVjqtALR7p02mnk40qHTR1Tdb/j0gXW9uigU6nQU9iCP+Poa1KF6PXpk=" docker_sets: - - set: docker/ubuntu-14.04 - - set: docker/centos-7 - - set: docker/debian-8 + - set: ubuntu1404-64 + - set: centos7-64 + - set: debian8-64 diff --git a/.travis.yml b/.travis.yml index 645e1466..e58d435a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,11 @@ sudo: false dist: trusty language: ruby cache: bundler +# related to https://github.com/rubygems/rubygems/issues/2123 before_install: - - rm -f Gemfile.lock + - 'rm -f Gemfile.lock' + - 'gem update --system' + - 'gem install bundler' script: - 'bundle exec rake $CHECK' matrix: @@ -12,32 +15,35 @@ matrix: include: - rvm: 2.1.9 bundler_args: --without system_tests development release - env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=16 - - rvm: 2.4.2 + env: PUPPET_VERSION="~> 4.0" CHECK=test PARALLEL_TEST_PROCESSORS=12 + - rvm: 2.4.4 + bundler_args: --without system_tests development release + env: PUPPET_VERSION="~> 5.0" CHECK=test + - rvm: 2.5.1 bundler_args: --without system_tests development release env: PUPPET_VERSION="~> 5.0" CHECK=test_with_coveralls - - rvm: 2.4.2 + - rvm: 2.4.4 bundler_args: --without system_tests development release env: PUPPET_VERSION="~> 5.0" CHECK=rubocop - - rvm: 2.4.2 + - rvm: 2.5.1 bundler_args: --without system_tests development release env: PUPPET_VERSION="~> 5.0" CHECK=build DEPLOY_TO_FORGE=yes - - rvm: 2.4.2 + - rvm: 2.5.1 bundler_args: --without development release dist: trusty - env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/ubuntu-14.04 CHECK=beaker + env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_setfile=ubuntu1404-64{hypervisor=docker} CHECK=beaker services: docker sudo: required - - rvm: 2.4.2 + - rvm: 2.5.1 bundler_args: --without development release dist: trusty - env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/centos-7 CHECK=beaker + env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_setfile=centos7-64{hypervisor=docker} CHECK=beaker services: docker sudo: required - - rvm: 2.4.2 + - rvm: 2.5.1 bundler_args: --without development release dist: trusty - env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_set=docker/debian-8 CHECK=beaker + env: PUPPET_INSTALL_TYPE=agent BEAKER_debug=true BEAKER_setfile=debian8-64{hypervisor=docker} CHECK=beaker services: docker sudo: required branches: diff --git a/Gemfile b/Gemfile index 1f8d9a86..1527b391 100644 --- a/Gemfile +++ b/Gemfile @@ -11,7 +11,7 @@ def location_for(place, fake_version = nil) end group :test do - gem 'puppetlabs_spec_helper', '~> 2.5.0', :require => false + gem 'puppetlabs_spec_helper', '~> 2.6.0', :require => false gem 'rspec-puppet', '~> 2.5', :require => false gem 'rspec-puppet-facts', :require => false gem 'rspec-puppet-utils', :require => false @@ -25,7 +25,7 @@ group :test do gem 'redcarpet', :require => false gem 'rubocop', '~> 0.49.1', :require => false if RUBY_VERSION >= '2.3.0' gem 'rubocop-rspec', '~> 1.15.0', :require => false if RUBY_VERSION >= '2.3.0' - gem 'mocha', '>= 1.2.1', :require => false + gem 'mocha', '~> 1.4.0', :require => false gem 'coveralls', :require => false gem 'simplecov-console', :require => false gem 'rack', '~> 1.0', :require => false if RUBY_VERSION < '2.2.2' @@ -40,7 +40,7 @@ group :development do end group :system_tests do - gem 'winrm', :require => false + gem 'winrm', :require => false if beaker_version = ENV['BEAKER_VERSION'] gem 'beaker', *location_for(beaker_version) else @@ -51,13 +51,14 @@ group :system_tests do else gem 'beaker-rspec', :require => false end - gem 'serverspec', :require => false - gem 'beaker-puppet_install_helper', :require => false - gem 'beaker-module_install_helper', :require => false + gem 'serverspec', :require => false + gem 'beaker-hostgenerator', '>= 1.1.10', :require => false + gem 'beaker-puppet_install_helper', :require => false + gem 'beaker-module_install_helper', :require => false end group :release do - gem 'github_changelog_generator', :require => false, :git => 'https://github.com/skywinder/github-changelog-generator' + gem 'github_changelog_generator', :require => false, :git => 'https://github.com/skywinder/github-changelog-generator' if RUBY_VERSION >= '2.2.2' gem 'puppet-blacksmith', :require => false gem 'voxpupuli-release', :require => false, :git => 'https://github.com/voxpupuli/voxpupuli-release-gem' gem 'puppet-strings', '~> 1.0', :require => false diff --git a/spec/acceptance/nodesets/docker/centos-5.yml b/spec/acceptance/nodesets/docker/centos-5.yml deleted file mode 100644 index c17bc3d0..00000000 --- a/spec/acceptance/nodesets/docker/centos-5.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - centos-5-x64: - platform: el-5-x86_64 - hypervisor: docker - image: centos:5 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which' - - 'sed -i -e "/mingetty/d" /etc/inittab' -CONFIG: - trace_limit: 200 - masterless: true -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/centos-6.yml b/spec/acceptance/nodesets/docker/centos-6.yml deleted file mode 100644 index d93f884c..00000000 --- a/spec/acceptance/nodesets/docker/centos-6.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - centos-6-x64: - platform: el-6-x86_64 - hypervisor: docker - image: centos:6 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'rm -rf /var/run/network/*' - - 'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which' - - 'rm /etc/init/tty.conf' -CONFIG: - trace_limit: 200 - masterless: true -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/centos-7.yml b/spec/acceptance/nodesets/docker/centos-7.yml deleted file mode 100644 index 41e924b5..00000000 --- a/spec/acceptance/nodesets/docker/centos-7.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - centos-7-x64: - platform: el-7-x86_64 - hypervisor: docker - image: centos:7 - docker_preserve_image: true - docker_cmd: '["/usr/sbin/init"]' - docker_image_commands: - - 'yum install -y crontabs initscripts iproute openssl sysvinit-tools tar wget which ss' - - 'systemctl mask getty@tty1.service' -CONFIG: - trace_limit: 200 - masterless: true -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/debian-7.yml b/spec/acceptance/nodesets/docker/debian-7.yml deleted file mode 100644 index 41b284d3..00000000 --- a/spec/acceptance/nodesets/docker/debian-7.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - debian-7-x64: - platform: debian-7-amd64 - hypervisor: docker - image: debian:7 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get update && apt-get install -y cron locales-all net-tools wget' -CONFIG: - trace_limit: 200 - masterless: true -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/debian-8.yml b/spec/acceptance/nodesets/docker/debian-8.yml deleted file mode 100644 index a630b7ef..00000000 --- a/spec/acceptance/nodesets/docker/debian-8.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - debian-8-x64: - platform: debian-8-amd64 - hypervisor: docker - image: debian:8 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get update && apt-get install -y cron locales-all net-tools wget' - - 'rm -f /usr/sbin/policy-rc.d' - - 'systemctl mask getty@tty1.service getty-static.service' -CONFIG: - trace_limit: 200 - masterless: true -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/debian-9.yml b/spec/acceptance/nodesets/docker/debian-9.yml deleted file mode 100644 index dfc8e9c0..00000000 --- a/spec/acceptance/nodesets/docker/debian-9.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/theforeman/foreman-installer-modulesync -HOSTS: - debian-9-x64: - platform: debian-9-amd64 - hypervisor: docker - image: debian:9 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get update && apt-get install -y cron locales-all net-tools wget systemd-sysv' - - 'rm -f /usr/sbin/policy-rc.d' - - 'systemctl mask getty@tty1.service getty-static.service' -CONFIG: - trace_limit: 200 - masterless: true -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/ubuntu-12.04.yml b/spec/acceptance/nodesets/docker/ubuntu-12.04.yml deleted file mode 100644 index ab77cda4..00000000 --- a/spec/acceptance/nodesets/docker/ubuntu-12.04.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - ubuntu-1204-x64: - platform: ubuntu-12.04-amd64 - hypervisor: docker - image: ubuntu:12.04 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y net-tools wget' - - 'locale-gen en_US.UTF-8' -CONFIG: - trace_limit: 200 - masterless: true -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/ubuntu-14.04.yml b/spec/acceptance/nodesets/docker/ubuntu-14.04.yml deleted file mode 100644 index ae453044..00000000 --- a/spec/acceptance/nodesets/docker/ubuntu-14.04.yml +++ /dev/null @@ -1,21 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - ubuntu-1404-x64: - platform: ubuntu-14.04-amd64 - hypervisor: docker - image: ubuntu:14.04 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'rm /usr/sbin/policy-rc.d' - - 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl' - - 'apt-get install -y net-tools wget apt-transport-https' - - 'locale-gen en_US.UTF-8' -CONFIG: - trace_limit: 200 - masterless: true -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/docker/ubuntu-16.04.yml b/spec/acceptance/nodesets/docker/ubuntu-16.04.yml deleted file mode 100644 index 2d173c5b..00000000 --- a/spec/acceptance/nodesets/docker/ubuntu-16.04.yml +++ /dev/null @@ -1,19 +0,0 @@ ---- -# This file is managed via modulesync -# https://github.com/voxpupuli/modulesync -# https://github.com/voxpupuli/modulesync_config -HOSTS: - ubuntu-1604-x64: - platform: ubuntu-16.04-amd64 - hypervisor: docker - image: ubuntu:16.04 - docker_preserve_image: true - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - 'apt-get install -y net-tools wget locales apt-transport-https' - - 'locale-gen en_US.UTF-8' -CONFIG: - trace_limit: 200 - masterless: true -... -# vim: syntax=yaml diff --git a/spec/acceptance/nodesets/fedora-25-x64.yml b/spec/acceptance/nodesets/fedora-25-x64.yml index 60ae0117..54dd3305 100644 --- a/spec/acceptance/nodesets/fedora-25-x64.yml +++ b/spec/acceptance/nodesets/fedora-25-x64.yml @@ -3,8 +3,6 @@ # https://github.com/voxpupuli/modulesync # https://github.com/voxpupuli/modulesync_config # -# platform is fedora 24 because there is no -# puppet-agent for fedora 25 by 2016-12-30 HOSTS: fedora-25-x64: roles: diff --git a/spec/default_facts.yml b/spec/default_facts.yml index 391316d8..13c41657 100644 --- a/spec/default_facts.yml +++ b/spec/default_facts.yml @@ -12,4 +12,3 @@ concat_basedir: "/tmp" ipaddress: "172.16.254.254" is_pe: false macaddress: "AA:AA:AA:AA:AA:AA" -root_home: /root diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index cdd49359..ea74a52a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,6 +2,10 @@ require 'rspec-puppet-facts' include RspecPuppetFacts +# This file is managed via modulesync +# https://github.com/voxpupuli/modulesync +# https://github.com/voxpupuli/modulesync_config + if Dir.exist?(File.expand_path('../../lib', __FILE__)) require 'coveralls' require 'simplecov'