Update .travis.yml file to test ansible usage

This commit is contained in:
Brian Telnes 2017-06-07 18:45:10 +00:00
Родитель 4bc9d989a9
Коммит 2a747d9929
2 изменённых файлов: 33 добавлений и 25 удалений

Просмотреть файл

@ -19,49 +19,56 @@ branches:
- btelnes
before_install:
- sudo apt-get -y update
- sudo apt-get -y install ansible
- sudo apt-get -y update -qq
- pip install ansible
# command to install dependencies
install:
# Add ansible.cfg
- "printf '[defaults]\nroles_path = /edx/app/edxapp/edx-platform/playbooks/roles' > ansible.cfg"
- git clone https://github.com/Microsoft/edx-platform.git edx/app/edxapp/edx-platform
- git clone https://github.com/Microsoft/edx-configuration.git
- pushd .
- cd edx/app/edxapp/edx-platform
- pip install --exists-action w -r requirements/edx-sandbox/base.txt
- pip install --exists-action w -r requirements/edx-sandbox/local.txt
- pip install --exists-action w -r requirements/edx-sandbox/post.txt
- popd
- pushd .
- cd edx-configuration/playbooks
- sudo ansible-playbook -i localhost, -c local edx_sandbox.yml --tags "edxapp"
- popd
- cd ../../edx/app/edxapp/edx-platform
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install 6.9.4
- npm install
# Check the role/playbook syntax
- ansible-playbook -i ./scripts/inventory /edx/app/edxapp/edx-platform/playbooks/edx_sandbox.yml --syntax-check
- pip install setuptools
- pip install --exists-action w -r requirements/edx/paver.txt
#- pushd .
#- cd ./edx/app/edxapp/edx-platform
#- pip install --exists-action w -r requirements/edx-sandbox/base.txt
#- pip install --exists-action w -r requirements/edx-sandbox/local.txt
#- pip install --exists-action w -r requirements/edx-sandbox/post.txt
#- popd
#- pushd .
#- cd edx-configuration/playbooks
#- sudo ansible-playbook -i localhost, -c local edx_sandbox.yml --tags "edxapp"
#- popd
#- cd ../../edx/app/edxapp/edx-platform
#- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install 6.9.4
#- npm install
#- pip install setuptools
#- pip install --exists-action w -r requirements/edx/paver.txt
# Mirror what paver install_prereqs does.
# After a successful build, Travis will
# cache the virtualenv at that state, so that
# the next build will not need to install them
# from scratch again.
- pip install --exists-action w -r requirements/edx/pre.txt
- pip install --exists-action w -r requirements/edx/github.txt
- pip install --exists-action w -r requirements/edx/local.txt
#- pip install --exists-action w -r requirements/edx/pre.txt
#- pip install --exists-action w -r requirements/edx/github.txt
#- pip install --exists-action w -r requirements/edx/local.txt
# HACK: within base.txt stevedore had a
# dependency on a version range of pbr.
# Install a version which falls within that range.
- pip install --exists-action w pbr==0.9.0
- pip install --exists-action w -r requirements/edx/base.txt
#- pip install --exists-action w pbr==0.9.0
#- pip install --exists-action w -r requirements/edx/base.txt
# - sudo apt-get update
- sudo apt-get install libxmlsec1-dev
- sudo apt-get install swig
- if [ -e requirements/edx/post.txt ]; then pip install --exists-action w -r requirements/edx/post.txt ; fi
#- sudo apt-get install libxmlsec1-dev
#- sudo apt-get install swig
#- if [ -e requirements/edx/post.txt ]; then pip install --exists-action w -r requirements/edx/post.txt ; fi
# command to run tests
script: ./scripts/travis-tests.sh

1
scripts/inventory Normal file
Просмотреть файл

@ -0,0 +1 @@
localhost