From 04b60f5879f349327d13a7891ad5b8305de72e2f Mon Sep 17 00:00:00 2001 From: Adham Helal Date: Tue, 12 Jul 2016 19:52:33 +0200 Subject: [PATCH 1/2] add basic standalone test --- .gitignore | 3 ++- .travis.yml | 25 +++++++++++++++++-------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 0bc4fb4..ffc0f91 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .*.sw* .vagrant/ -.kitchen/ \ No newline at end of file +.kitchen/ +*.retry \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index dec7ee7..e7c88fb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,26 @@ --- language: python python: "2.7" +services: + - docker + before_install: + # Make sure everything's up to date. - sudo apt-get update -qq + - sudo apt-get install -qq python-apt python-pycurl git python-pip ruby ruby-dev build-essential autoconf + - gem install bundler + # Get ansible install + - curl -s https://raw.githubusercontent.com/AutomationWithAnsible/ansible-setup/master/example/travis-install -o /tmp/travis-ansible-setup.sh + install: - # Install Ansible. - - pip install ansible + - bash /tmp/travis-ansible-setup.sh + - bundle install - # Create an inventory file for testing. - - "printf 'rabbit-standalone ansible_ssh_host=localhost' > inventory" script: - # Check the role/playbook's syntax. - - "ansible-playbook -i inventory vagrant/site.yml --syntax-check" + - ansible --version + - export TRAVIS=True + - bundle exec kitchen list + - bundle exec kitchen test --destroy=always standalone - # NOTE(retr0h): Testing standalone until we can test a cluster with travis. - - "ansible-playbook -vvvv -i inventory vagrant/standalone.yml --connection=local --sudo" +after_success: + - echo "Success" \ No newline at end of file From 91131d7dec73f62a3d45190e7799b36845da77d6 Mon Sep 17 00:00:00 2001 From: Adham Helal Date: Wed, 13 Jul 2016 00:13:08 +0200 Subject: [PATCH 2/2] ansible setup --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e7c88fb..2e965cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ before_install: - sudo apt-get install -qq python-apt python-pycurl git python-pip ruby ruby-dev build-essential autoconf - gem install bundler # Get ansible install - - curl -s https://raw.githubusercontent.com/AutomationWithAnsible/ansible-setup/master/example/travis-install -o /tmp/travis-ansible-setup.sh + - curl -s https://raw.githubusercontent.com/AutomationWithAnsible/ansible-setup/master/example/travis_2.x.sh -o /tmp/travis-ansible-setup.sh install: - bash /tmp/travis-ansible-setup.sh @@ -23,4 +23,4 @@ script: - bundle exec kitchen test --destroy=always standalone after_success: - - echo "Success" \ No newline at end of file + - echo "Success"