Skip to content

Commit

Permalink
Add kitchen docker tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kbogtob committed Jan 22, 2020
1 parent d3c6b77 commit a7a33a0
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .kitchen.docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
driver:
name: docker

provisioner:
name: puppet_apply
manifests_path: environments/etc/manifests
modules_path: /tmp/modules
require_puppet_repo: true
require_chef_for_busser: false
puppet_debug: true
puppet_verbose: true
custom_pre_apply_command: 'cp -r /tmp/modules/* /tmp/kitchen/modules/'

platforms:
- name: centos-7
driver_config:
# we use a custom image that runs systemd
image: 'datadog/docker-library:chef_kitchen_systemd_centos_7'
run_command: /root/start.sh

driver:
provision_command:
- rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
- yum install -y puppet

- mkdir /home/kitchen/puppet
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile

- gem install r10k -v 2.6.7
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules

- name: centos-8
driver_config:
# we use a custom image that runs systemd
image: 'datadog/docker-library:chef_kitchen_systemd_centos_8'
run_command: /root/start.sh

driver:
provision_command:
- dnf install -y https://yum.puppetlabs.com/puppet-release-el-8.noarch.rpm
- dnf install -y puppet

- mkdir /home/kitchen/puppet
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile

- gem install r10k -v 2.6.7
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules

- name: ubuntu-16.04 # we use the official image
driver:
provision_command:
- apt-get install -y apt-utils apt-transport-https ca-certificates
- wget https://apt.puppetlabs.com/puppet6-release-xenial.deb
- dpkg -i puppet6-release-xenial.deb
- apt-get install -y puppet

- mkdir /home/kitchen/puppet
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile

- gem install r10k -v 2.6.7
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules

verifier:
name: serverspec

suites:
- name: dd-agent
manifests: init.pp
verifier:
default_pattern: true
additional_install_commmand: source /etc/profile.d/rvm.sh
env_vars:
TARGET_HOST: 127.0.0.1
TARGET_PORT: 2222
LOGIN_USER: root
LOGIN_PASSWORD: puppet

0 comments on commit a7a33a0

Please sign in to comment.