Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Travis configuration to test all node types. #97

Merged
merged 15 commits into from Oct 28, 2015
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Update Travis configuration to test all node types.

For each node type in top.sls, check that
highstate is successfully reached (no errors).
This includes Linux and Mac OS X machines.
  • Loading branch information
aneeshusa committed Oct 27, 2015
commit f30d7ff03306b4e9afa6d790d104eca47919ff7e
@@ -1,32 +1,38 @@
language: python
python:
- '2.7'
# Python is not supported on OS X yet
# But a system python is installed for all workers
language: cpp

# NOTE: Make sure the matrix covers all node types in top.sls
matrix:
include:
- os: linux
env: SALT_NODE_ID=servo-master
- os: linux
env: SALT_NODE_ID=servo-linux1
- os: osx
env: SALT_NODE_ID=servo-mac1
- os: linux
env: SALT_NODE_ID=servo-linux-android1
- os: linux
env: SALT_NODE_ID=servo-head

before_install:
- sudo add-apt-repository -y ppa:saltstack/salt
- sudo apt-get update
- sudo apt-get install salt-master salt-minion
- sudo mkdir -p /srv/salt/states
- sudo cp .travis/minion /etc/salt/minion
- .travis/install_salt

install:
# Copy the states
- sudo cp -r . /srv/salt/states
- sudo cp .travis/minion /etc/salt/minion
- sudo service salt-minion restart

- sudo mkdir -p /srv/salt/states
- sudo cp -r . /srv/salt/states

# Additional debug help. May fail if run before Salt finishes restarting.
# - sudo cat /var/log/salt/*

# For additional debugging, see what's in grains on a travis box
- sudo salt-call grains.items --local
# For debugging, check the grains reported by the Travis builder
- sudo salt-call --id="${SALT_NODE_ID}" grains.items

script:
# Minimally validate YAML and Jinja at a basic level
- sudo salt-call state.show_highstate --local --retcode-passthrough
- sudo salt-call --id="${SALT_NODE_ID}" --retcode-passthrough state.show_highstate
# Full on installation test
- sudo salt-call state.highstate --local
- sudo salt-call --id="${SALT_NODE_ID}" --retcode-passthrough state.highstate

notifications:
webhooks: http://build.servo.org:54856/travis
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then
printf "$0: installing salt for Linux\n"
# Travis uses Ubuntu 12.04
sudo add-apt-repository -y ppa:saltstack/salt
sudo apt-get -y update
sudo apt-get -y install salt-minion
elif [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
printf "$0: installing salt for Mac OS X\n"
brew update
brew install saltstack
else
if [[ -v TRAVIS_OS_NAME ]]; then
printf >&2 "$0: unknown os type ${TRAVIS_OS_NAME}\n"
else
printf >&2 "$0: environment variable TRAVIS_OS_NAME not set\n"
fi
exit 1
fi
@@ -1,3 +1,5 @@
# NOTE: Ensure all node types are covered in .travis.yml

base:
'*':
- common
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.