forked from datosgobar/georef-ar-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (44 loc) · 1.26 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
42
43
44
language: python
sudo: required
python:
- '3.6'
install:
- pip install -r requirements.txt -r requirements-dev.txt
- sudo apt-get update -qq
- sudo apt-get install -y openvpn
script:
- make code_checks
- make test_mock
deploy:
- provider: script
skip_cleanup: true
script: 'bash deploy/travis.sh production'
on:
tags: true
branch: master
repo: datosgobar/georef-ar-api
- provider: script
skip_cleanup: true
script: 'bash deploy/travis.sh staging'
on:
branch: master
repo: datosgobar/georef-ar-api
- provider: script
skip_cleanup: true
script: 'bash deploy/travis.sh development'
on:
branch: development
repo: datosgobar/georef-ar-api
before_deploy:
- openssl aes-256-cbc -K $encrypted_4c0bf4b7e010_key -iv $encrypted_4c0bf4b7e010_iv
-in deploy/deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
- openssl aes-256-cbc -K $encrypted_5f43eadfe7ce_key -iv $encrypted_5f43eadfe7ce_iv
-in deploy/travis_georef.ovpn.enc -out travis_georef.ovpn -d
- sudo openvpn --config travis_georef.ovpn --daemon --verb 3 --writepid openvpn.pid --log openvpn.log
- sleep 10
- sudo ip link set tun0 mtu 1200
after_deploy:
- sudo kill -SIGTERM $(cat openvpn.pid)