forked from kobotoolbox/dkobo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
41 lines (39 loc) · 1.35 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
language: python
python:
- '2.7'
addons:
postgresql: 9.3
cache:
directories:
- $HOME/.pip-download-cache
- node_modules
before_install:
- gem install sass
- npm install --save-dev
- bower install
script:
- python manage.py test
- grunt test
env:
- PIP_DOWNLOAD_CACHE=$HOME/.pip-download-cache DJANGO_DEBUG=False DJANGO_SECRET_KEY=ZGtvYm90cmF2aXM
install:
- pip install -r requirements.txt
- python manage.py syncdb --noinput --settings=dkobo.settings
- python manage.py migrate --noinput --settings=dkobo.settings
# Deploy to kf.kbtdev.org, based on
# http://docs.travis-ci.com/user/deployment/custom/
after_success:
- echo '*** Deploying to staging server'
# Decrypt private key
- openssl aes-256-cbc -K $encrypted_8f9663515218_key -iv $encrypted_8f9663515218_iv
-in .travis/staging_deploy_key.pem.enc -out .travis/staging_deploy_key.pem
-d
# Install private key
- chmod 600 .travis/staging_deploy_key.pem
- eval "$(ssh-agent)" # Travis documentation omits this, but without it ssh-add fails
- ssh-add .travis/staging_deploy_key.pem
# Execute deployment script via SSH
- test "$TRAVIS_PULL_REQUEST" == 'false' -a "$TRAVIS_BRANCH" == 'master' && ssh -o UserKnownHostsFile=.travis/staging_known_host [email protected] /home/ubuntu/scripts/deploy.sh koboform "$TRAVIS_COMMIT"
notifications:
irc: irc.freenode.org#kobotest
flowdock: ad631fc562736cf87e0c4439f9518f9d