-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
51 lines (51 loc) · 4.4 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
45
46
47
48
49
50
51
language: python
python:
- 2.7
services:
- docker
jobs:
include:
- stage: test
install:
- pip install -r requirements.txt
script:
- python manage.py makemigrations
- python manage.py migrate
- stage: deploy-dev
if: branch = master AND type = push
before_script:
- docker pull philm/ansible_playbook
- git clone -b master https://github.com/biojs/biojs-backend-ansible.git
- openssl aes-256-cbc -K $encrypted_cf08b333dbdc_key -iv $encrypted_cf08b333dbdc_iv
-in deployment-key.enc -out ~/.ssh/id_rsa -d
script:
- docker run -it -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v "$(pwd)/biojs-backend-ansible":/ansible/playbooks
-e DB_USER=$DB_USER
-e DB_PASSWORD=$DB_PASSWORD
-e GITHUB_CLIENT_SECRET=$GITHUB_CLIENT_SECRET
-e GITHUB_CLIENT_ID=$GITHUB_CLIENT_ID
philm/ansible_playbook dev-deploy.yml
--private-key=~/.ssh/id_rsa -u ubuntu -i dev_hosts
- stage: deploy-production
if: branch = production AND type = push
before_script:
- docker pull philm/ansible_playbook
- git clone -b production https://github.com/biojs/biojs-backend-ansible.git
- openssl aes-256-cbc -K $encrypted_cf08b333dbdc_key -iv $encrypted_cf08b333dbdc_iv
-in deployment-key.enc -out ~/.ssh/id_rsa -d
script:
- docker run -it -v ~/.ssh/id_rsa:/root/.ssh/id_rsa -v "$(pwd)/biojs-backend-ansible":/ansible/playbooks
-e DB_USER=$DB_USER
-e DB_PASSWORD=$DB_PASSWORD
-e GITHUB_CLIENT_SECRET=$GITHUB_CLIENT_SECRET
-e GITHUB_CLIENT_ID=$GITHUB_CLIENT_ID
philm/ansible_playbook production-deploy.yml
--private-key=~/.ssh/id_rsa -u ubuntu -i production_hosts
notifications:
email: true
env:
global:
- sec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