Skip to content

Commit

Permalink
Docker Beaker
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Pivotto <[email protected]>
  • Loading branch information
roidelapluie committed Jun 14, 2016
1 parent 84e87e8 commit 1b8e399
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 2 deletions.
18 changes: 17 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
sudo: false
language: ruby
cache: bundler
bundler_args: --without system_tests development
bundler_args: --without development
before_install:
- bundle -v
- rm Gemfile.lock || true
Expand All @@ -29,6 +29,22 @@ matrix:
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=rubocop
- rvm: 2.3.1
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=test
- rvm: 2.1
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=acceptance BEAKER_debug=true BEAKER_set=docker/centos-7 PUPPET_INSTALL_TYPE=foss PUPPET_INSTALL_VERSION=3.8.7
services: docker
sudo: required
- rvm: 2.1
env: PUPPET_VERSION="~> 3.0" STRICT_VARIABLES="yes" CHECK=acceptance BEAKER_debug=true BEAKER_set=docker/ubuntu-14.04 PUPPET_INSTALL_TYPE=foss PUPPET_INSTALL_VERSION=3.8.7
services: docker
sudo: required
- rvm: 2.3.1
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=acceptance BEAKER_debug=true BEAKER_set=docker/centos-7 PUPPET_INSTALL_TYPE=agent PUPPET_INSTALL_VERSION=1.5.1
services: docker
sudo: required
- rvm: 2.3.1
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes" CHECK=acceptance BEAKER_debug=true BEAKER_set=docker/ubuntu-14.04 PUPPET_INSTALL_TYPE=agent PUPPET_INSTALL_VERSION=1.5.1
services: docker
sudo: required
notifications:
email: false
deploy:
Expand Down
15 changes: 15 additions & 0 deletions spec/acceptance/nodesets/docker/centos-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file comes from puppetlabs-apache, and is released under the apache-2.0 licence
# https://github.com/puppetlabs/modulesync_configs/blob/master/moduleroot/spec/acceptance/nodesets/docker/centos-7.yml
HOSTS:
centos-7-x64:
platform: el-7-x86_64
hypervisor: docker
image: centos:7
docker_preserve_image: true
docker_cmd: '["/usr/sbin/init"]'
# install various tools required to get the image up to usable levels
docker_image_commands:
- 'yum install -y crontabs tar wget openssl sysvinit-tools iproute which initscripts'
CONFIG:
trace_limit: 200
masterless: true
15 changes: 15 additions & 0 deletions spec/acceptance/nodesets/docker/ubuntu-14.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file comes from puppetlabs-apache, and is released under the apache-2.0 licence
# https://github.com/puppetlabs/modulesync_configs/blob/master/moduleroot/spec/acceptance/nodesets/docker/ubuntu-14.04.yml.yml
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:
# ensure that upstart is booting correctly in the container
- 'rm /usr/sbin/policy-rc.d && rm /sbin/initctl && dpkg-divert --rename --remove /sbin/initctl && apt-get update && apt-get install -y net-tools wget && locale-gen en_US.UTF-8'
CONFIG:
trace_limit: 200
masterless: true
8 changes: 7 additions & 1 deletion spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
default[:default_apply_opts][:parser] = 'future'
end

copy_root_module_to(default, source: proj_root, module_name: 'corosync')
puppet_version = get_puppet_version
if Puppet::Util::Package.versioncmp(puppet_version, '4.0.0') < 0
copy_root_module_to(default, source: proj_root, module_name: 'corosync', target_module_path: '/etc/puppet/modules')
else
copy_root_module_to(default, source: proj_root, module_name: 'corosync')
end

hosts.each do |host|
on host, puppet('module', 'install', 'puppetlabs-stdlib'), acceptable_exit_codes: [0, 1]
end
Expand Down

0 comments on commit 1b8e399

Please sign in to comment.