Browse Source

Merge pull request #34 from daks/travis-tests

WIP: configuring travis-ci tests
tags/v0.9.0
Javier Bértoli 6 years ago
parent
commit
ddb69af3c0
No account linked to committer's email address
4 changed files with 114 additions and 0 deletions
  1. +44
    -0
      .kitchen.docker.yml
  2. +50
    -0
      .kitchen.yml
  3. +11
    -0
      .travis.yml
  4. +9
    -0
      Gemfile

+ 44
- 0
.kitchen.docker.yml 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
- 0
.kitchen.yml 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
- 0
.travis.yml View File

@@ -0,0 +1,11 @@
sudo: required
cache: bundler
language: ruby

services:
- docker

before_install:
- bundle install

script: bundle exec kitchen verify

+ 9
- 0
Gemfile 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'


Loading…
Cancel
Save