From 876458f8af57ff5cd12f7c567f0c85bbe7828d7a Mon Sep 17 00:00:00 2001 From: edunham Date: Tue, 9 Jun 2015 16:11:20 -0700 Subject: [PATCH] Let's test configs https://lambdaops.com/automation/travis/travis%20ci/configuration%20management/continuous%20integration/salt/chef/saltstack/salt%20stack/2014/01/29/travis-for-salt-states/ claims that this configuration works for basic validation of salt errors. It should at least catch typos before they get to production. --- .travis.yml | 24 ++++++++++++++++++++++++ .travis/minion | 4 ++++ 2 files changed, 28 insertions(+) create mode 100644 .travis.yml create mode 100644 .travis/minion diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..3bf21c43 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: python +python: +- '2.7' + +before_install: + - sudo apt-get update + - curl -L http://bootstrap.saltstack.org | sudo sh -s -- git develop + +install: + # Copy these states + - sudo mkdir -p /srv/salt/states + - sudo cp -r . /srv/salt/states + - sudo cp .travis/minion /etc/salt/minion + - sudo service salt-minion restart + + # Additional debug help + - sudo cat /var/log/salt/* + + # See what kind of travis box you're on + # to help with making your states compatible with travis + - sudo salt-call grains.items --local + +script: + - sudo salt-call state.show_highstate --local --retcode-passthrough diff --git a/.travis/minion b/.travis/minion new file mode 100644 index 00000000..0cc9e89e --- /dev/null +++ b/.travis/minion @@ -0,0 +1,4 @@ +file_client: local +file_roots: + base: + - /srv/salt/states