Merge pull request #1 from Martin819/master
Updated Kitchen tests and Added Travis
diff --git a/.gitignore b/.gitignore
index aa8e42a..08422ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,8 @@
*.swp
*.pyc
.ropeproject
+.kitchen/
+.kitchen.local.yml
+.kitchen
+.bundle
+.vendor
diff --git a/.kitchen.docker.yml b/.kitchen.docker.yml
deleted file mode 100644
index 554ad82..0000000
--- a/.kitchen.docker.yml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-driver:
- name: docker
- hostname: logrotate.ci.local
- use_sudo: false
-
-provisioner:
- salt_bootstrap_url: https://raw.githubusercontent.com/epcim/salt-bootstrap/add-apt-transport-https-ubuntu/bootstrap-salt.sh
- grains:
- noservices: True
-
-platforms:
- - name: ubuntu-14.04
- - name: ubuntu-16.04
- - name: centos-7
-
diff --git a/.kitchen.vagrant.yml b/.kitchen.vagrant.yml
new file mode 100644
index 0000000..da81168
--- /dev/null
+++ b/.kitchen.vagrant.yml
@@ -0,0 +1,30 @@
+---
+driver:
+ name: vagrant
+ vm_hostname: logrotate.ci.local
+ use_sudo: false
+ customize:
+ memory: 512
+
+
+provisioner:
+ name: salt_solo
+ salt_install: bootstrap
+ salt_bootstrap_url: https://bootstrap.saltstack.com
+ salt_version: latest
+ require_chef: false
+ formula: logrotate
+ log_level: info
+ state_top:
+ base:
+ "*":
+ - logrotate
+ pillars:
+ top.sls:
+ base:
+ "*":
+ - logrotate
+ grains:
+ noservices: True
+
+# vim: ft=yaml sw=2 ts=2 sts=2 tw=125
diff --git a/.kitchen.yml b/.kitchen.yml
index 02deb83..d358472 100644
--- a/.kitchen.yml
+++ b/.kitchen.yml
@@ -1,20 +1,19 @@
-# vim: ft=yaml
---
driver:
- name: vagrant
- customize:
- memory: 512
- vm_hostname: logrotate.ci.local
+ name: docker
+ hostname: logrotate.ci.local
+ use_sudo: false
provisioner:
name: salt_solo
- # As of 2016/06 http://bootstrap.saltstack.org do not handle ubuntu 16.04. and fails in docker container
- # salt_bootstrap_url: https://bootstrap.saltstack.org
- salt_bootstrap_url: https://raw.githubusercontent.com/epcim/salt-bootstrap/add-apt-transport-https-ubuntu/bootstrap-salt.sh
salt_install: bootstrap
+ salt_bootstrap_url: https://bootstrap.saltstack.com
salt_version: latest
+ require_chef: false
+ log_level: error
formula: logrotate
- log_level: info
+ grains:
+ noservices: True
state_top:
base:
"*":
@@ -24,18 +23,22 @@
base:
"*":
- logrotate
- logrotate.sls:
- server:
- ssl:
- enabled: false
+
+verifier:
+ name: inspec
+ sudo: true
platforms:
- - name: bento/ubuntu-14.04
- - name: bento/ubuntu-16.04
- - name: bento/centos-7
+ - name: <%=ENV['PLATFORM'] || 'ubuntu-xenial'%>
+ driver_config:
+ image: <%=ENV['PLATFORM'] || 'trevorj/salty-whales:xenial'%>
+ platform: ubuntu
+
suites:
+
- name: server
provisioner:
pillars-from-files:
logrotate.sls: tests/pillar/server.sls
+# vim: ft=yaml sw=2 ts=2 sts=2 tw=125
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..4c8e84e
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,29 @@
+sudo: required
+services:
+ - docker
+
+install:
+ - pip install PyYAML
+ - pip install virtualenv
+ - |
+ test -e Gemfile || cat <<EOF > Gemfile
+ source 'https://rubygems.org'
+ gem 'rake'
+ gem 'test-kitchen'
+ gem 'kitchen-docker'
+ gem 'kitchen-inspec'
+ gem 'inspec'
+ gem 'kitchen-salt', :git => 'https://github.com/epcim/kitchen-salt.git', :branch => 'dependencis-pkg-repo2'
+ #Waiting for PR#78
+ #gem 'kitchen-salt', '>=0.2.25'
+ - bundle install
+
+env:
+ - PLATFORM=trevorj/salty-whales:trusty
+ - PLATFORM=trevorj/salty-whales:xenial
+
+before_script:
+ - make test | tail
+
+script:
+ - test ! -e .kitchen.yml || bundle exec kitchen test -t tests/integration