mirror of
https://github.com/inspec/inspec
synced 2024-11-22 20:53:11 +00:00
update kitchen container, activate all in travis
This commit is contained in:
parent
1c9d998afd
commit
93a068b8fa
8 changed files with 59 additions and 27 deletions
25
.kitchen.yml
25
.kitchen.yml
|
@ -21,10 +21,6 @@ platforms:
|
|||
- name: ubuntu-14.04
|
||||
driver:
|
||||
image: ubuntu:14.04
|
||||
- name: ubuntu-15.10
|
||||
driver:
|
||||
image: ubuntu:15.10
|
||||
pid_one_command: /bin/systemd
|
||||
- name: ubuntu-16.04
|
||||
driver:
|
||||
image: ubuntu:16.04
|
||||
|
@ -34,37 +30,36 @@ platforms:
|
|||
- name: centos-6.6
|
||||
driver:
|
||||
image: centos:6.6
|
||||
- name: centos-6.7
|
||||
- name: centos-6.8
|
||||
driver:
|
||||
image: centos:6.7
|
||||
image: centos:6.8
|
||||
intermediate_instructions:
|
||||
- RUN yum install -y initscripts
|
||||
- name: centos-7
|
||||
driver:
|
||||
image: centos:7
|
||||
pid_one_command: /usr/lib/systemd/systemd
|
||||
- name: oracle-6.6
|
||||
driver:
|
||||
image: oraclelinux:6.6
|
||||
- name: oracle-6.7
|
||||
driver:
|
||||
image: oraclelinux:6.7
|
||||
- name: oracle-7.1
|
||||
- name: oracle-7.2
|
||||
driver:
|
||||
image: oraclelinux:7.1
|
||||
image: oraclelinux:7.2
|
||||
pid_one_command: /usr/lib/systemd/systemd
|
||||
- name: debian-7
|
||||
driver:
|
||||
image: debian:7
|
||||
image: debian:7.11
|
||||
intermediate_instructions:
|
||||
- RUN /usr/bin/apt-get update
|
||||
- RUN /usr/bin/apt-get install -y procps
|
||||
# running it within the chef recipe is too late :-(
|
||||
- RUN /usr/bin/apt-get install -y procps lsb-release
|
||||
- name: debian-8
|
||||
driver:
|
||||
image: debian:8
|
||||
image: debian:8.5
|
||||
intermediate_instructions:
|
||||
- RUN /usr/bin/apt-get update
|
||||
- RUN /usr/bin/apt-get install -y procps
|
||||
# running it within the chef recipe is too late :-(
|
||||
- RUN /usr/bin/apt-get install -y procps lsb-release
|
||||
pid_one_command: /bin/systemd
|
||||
|
||||
suites:
|
||||
|
|
29
.travis.yml
29
.travis.yml
|
@ -26,10 +26,39 @@ matrix:
|
|||
bundler_args: "--without guard tools"
|
||||
script: bundle exec rake $SUITE
|
||||
env: SUITE=test:integration OS=default-ubuntu-1204 DOCKER=true
|
||||
- rvm: 2.2
|
||||
bundler_args: "--without guard tools"
|
||||
script: bundle exec rake $SUITE
|
||||
env: SUITE=test:integration OS='default-ubuntu-1404' DOCKER=true
|
||||
- rvm: 2.2
|
||||
bundler_args: "--without guard tools"
|
||||
script: bundle exec rake $SUITE
|
||||
env: SUITE=test:integration OS='default-ubuntu-1604' DOCKER=true
|
||||
- rvm: 2.2
|
||||
bundler_args: "--without guard tools"
|
||||
script: bundle exec rake $SUITE
|
||||
env: SUITE=test:integration OS='default-centos-68' DOCKER=true
|
||||
- rvm: 2.2
|
||||
bundler_args: "--without guard tools"
|
||||
script: bundle exec rake $SUITE
|
||||
env: SUITE=test:integration OS='default-centos-7' DOCKER=true
|
||||
- rvm: 2.2
|
||||
bundler_args: "--without guard tools"
|
||||
script: bundle exec rake $SUITE
|
||||
env: SUITE=test:integration OS='default-debian-7' DOCKER=true
|
||||
- rvm: 2.2
|
||||
bundler_args: "--without guard tools"
|
||||
script: bundle exec rake $SUITE
|
||||
env: SUITE=test:integration OS='default-debian-8' DOCKER=true
|
||||
- rvm: 2.2
|
||||
bundler_args: "--without guard tools"
|
||||
script: bundle exec rake $SUITE
|
||||
env: SUITE=test:integration OS='default-oracle-67' DOCKER=true
|
||||
- rvm: 2.2
|
||||
bundler_args: "--without guard tools"
|
||||
script: bundle exec rake $SUITE
|
||||
env: SUITE=test:integration OS='default-oracle-72' DOCKER=true
|
||||
|
||||
deploy:
|
||||
provider: rubygems
|
||||
on:
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
# add nginx apt repository
|
||||
case node['platform']
|
||||
when 'ubuntu'
|
||||
include_recipe('apt')
|
||||
# use ppa
|
||||
apt_repository 'nginx' do
|
||||
uri 'ppa:nginx/stable'
|
||||
distribution node['lsb']['codename']
|
||||
end
|
||||
when 'debian'
|
||||
include_recipe('apt')
|
||||
# use plain repo
|
||||
apt_repository 'nginx' do
|
||||
uri 'http://nginx.org/packages/debian'
|
||||
distribution node['lsb']['codename']
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
#
|
||||
# prepare all operating systems with the required configuration
|
||||
|
||||
# container preparation
|
||||
include_recipe('os_prepare::prep_container')
|
||||
|
||||
# basic tests
|
||||
include_recipe('os_prepare::file')
|
||||
|
|
|
@ -5,9 +5,8 @@
|
|||
# installs everything to do the package test
|
||||
|
||||
case node['platform']
|
||||
when 'ubuntu'
|
||||
when 'ubuntu', 'debian'
|
||||
include_recipe('apt')
|
||||
|
||||
package 'curl'
|
||||
when 'rhel', 'centos', 'fedora'
|
||||
include_recipe('yum')
|
||||
|
|
15
test/cookbooks/os_prepare/recipes/prep_container.rb
Normal file
15
test/cookbooks/os_prepare/recipes/prep_container.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# encoding: utf-8
|
||||
# author: Christoph Hartmann
|
||||
# author: Dominik Richter
|
||||
#
|
||||
# prepares container for normal use :-)
|
||||
|
||||
# install docker pre-conditions
|
||||
if ['ubuntu', 'debian'].include?(node['platform'])
|
||||
include_recipe('apt')
|
||||
|
||||
# if package lsb-release & procps is not installed
|
||||
# chef returns an empty node['lsb']['codename']
|
||||
package("lsb-release")
|
||||
package("procps")
|
||||
end
|
|
@ -29,11 +29,6 @@ elsif os[:family] == 'debian'
|
|||
it { should be_enabled }
|
||||
end
|
||||
|
||||
describe apt('http://nginx.org/packages/debian') do
|
||||
it { should exist }
|
||||
it { should be_enabled }
|
||||
end
|
||||
|
||||
describe apt('https://deb.nodesource.com/node_4.x/dists/precise/') do
|
||||
it { should_not exist }
|
||||
it { should_not be_enabled }
|
||||
|
|
|
@ -11,7 +11,6 @@ when 'aix'
|
|||
its('version') { should match /^(6|7)[.|\d]+\d$/ }
|
||||
end
|
||||
when 'solaris'
|
||||
|
||||
if os[:release] == '11'
|
||||
pkg = 'system/file-system/zfs'
|
||||
ver = /^0\.5.+$/
|
||||
|
@ -24,8 +23,6 @@ when 'solaris'
|
|||
it { should be_installed }
|
||||
its('version') { should match ver }
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
describe package('nginx') do
|
||||
|
|
Loading…
Reference in a new issue