1
0
Fork 0
mirror of synced 2024-07-15 22:26:41 -04:00

configuring travis-ci tests, using Kitchen with Docker, and Inspec

This commit is contained in:
Eric Veiras Galisson 2018-08-23 13:07:21 +02:00
parent 6575a95764
commit ceb090831f
4 changed files with 114 additions and 0 deletions

44
.kitchen.docker.yml Normal file
View file

@ -0,0 +1,44 @@
driver:
name: docker
use_sudo: false
privileged: true
synced_folders:
- ['.kitchen/cache', '/tmp/omnibus', disabled: true]
provisioner:
name: salt_solo
salt_install: bootstrap
salt_version: latest
salt_bootstrap_url: https://bootstrap.saltstack.com
salt_bootstrap_options: -X -p git -p curl -p sudo
is_file_root: true
formula: logrotate
require_chef: false
require_chef: false
salt_pillar_root: pillar.example
pillars-from-files:
logrotate.sls: pillar.example
pillars:
top.sls:
base:
"*":
- logrotate
state_top:
base:
'*':
- logrotate
- logrotate.jobs
platforms:
- name: centos
- name: opensuse
- name: ubuntu
- name: debian
suites:
- name: default
verifier:
name: inspec

50
.kitchen.yml Normal file
View file

@ -0,0 +1,50 @@
---
driver:
name: docker
driver_config:
use_sudo: false
privileged: true
provision_command: mkdir -p /run/sshd
run_command: /lib/systemd/systemd
platforms:
- name: debian-9
- name: ubuntu-18.04
- name: fedora-27
- name: centos-7
provisioner:
name: salt_solo
log_level: info
require_chef: false
salt_install: bootstrap
salt_version: latest
salt_bootstrap_url: https://bootstrap.saltstack.com
salt_bootstrap_options: -X -p git -p curl -p sudo
formula: logrotate
salt_pillar_root: pillar.example
pillars-from-files:
logrotate.sls: pillar.example
pillars:
top.sls:
base:
"*":
- logrotate
state_top:
base:
'*':
- logrotate
- logrotate.jobs
verifier:
name: inspec
reporter:
- cli
inspec_tests:
- path: test/integration/default
suites:
- name: default

11
.travis.yml Normal file
View file

@ -0,0 +1,11 @@
sudo: required
cache: bundler
language: ruby
services:
- docker
before_install:
- bundle install
script: bundle exec kitchen verify

9
Gemfile Normal file
View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
source "https://rubygems.org"
gem 'test-kitchen'
gem 'kitchen-docker'
gem 'kitchen-salt'
gem 'kitchen-inspec'