This repository has been archived by the owner on Sep 28, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy path.travis.yml
45 lines (45 loc) · 2.22 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
language: python
services:
- docker
env:
global:
- AWS_DEFAULT_REGION=us-east-1
- secure: IGCVQAaPbhBW47WUGtlOftOpPM7yIz3jk61niBmtF/ACIO9m8Y7KU2+Rl3MwM+4xGv4v0py9kpqAjk7FPCS6PCGA2pUpjMFuXiX7Dfh5Gsy1C0E/j2fvoTkOXkuterw0BcIwi7epymoY4aA8X0GinzuJ1B3sLJXqX8wfH49PSW0=
- secure: HgBnUcWY+L4XCzSBmg1JqCkMeN+5yoA23XTdTbJ0N5K8YXUpzP58FoYkwbhd5sjdnkcSr+2gnGzzxCQ9yxqiD0S78omjYPVurGntwGFdRjy9tATNpWbFqk9sViDX8ge+jx3+DYDIutXvZPZwrS4gkShHrByZrkQJvQTFBjwWkPQ=
- secure: ZtiP7tz+wmIHTzMHoBu6zm0yY02xRAJHwC37/jDbkkmEAxN4WqDGqYRH7acmsfeaWnuiyeBR1pT+yYRfuqKtEVju8s40nHSB1IT5FWHYlFNBRLKxEGKtChEPhtH8C9tfWYfhstal1+paac57tTsIGIRcmTRDwM+Z37qulWWAlYA=
- secure: VuyX3iVEe+vufr4o4+dVooyZ8kk3Vv68g0aGFWysJCuvwlvM1oFwuc4MfybfXmHr433Unxn5DtbHyeeyRuOG9KTdcKlE6ESsxzuiF4RI+CVz8FbjE5tmQXbGsVTkNASYFOLyppLv5d7Wu93Phu7cJYzBOYbcN7winTBRDl9/5KI=
install:
- pip install awscli
- cp .env.sample .env
- sed -i 's/WEB_APP_PASSWORD=/WEB_APP_PASSWORD=travis/' .env
- sed -i 's/ADMIN_PASSWORD=/ADMIN_PASSWORD=admin/' .env
- sed -i 's/DATABASE_PASSWORD=/DATABASE_PASSWORD=district_builder/' .env
- sed -i 's/KEY_VALUE_STORE_PASSWORD=/KEY_VALUE_STORE_PASSWORD=redis/' .env
- sed -i 's/MAP_SERVER_ADMIN_PASSWORD=/MAP_SERVER_ADMIN_PASSWORD=geoserver/' .env
- cp django/publicmapping/config/config.dist.xml django/publicmapping/config/config.xml
- "./scripts/update"
- wget -qO ./data/districtbuilder_data.zip https://s3.amazonaws.com/districtbuilderdata/VA_data.zip
script:
- "./scripts/test"
before_deploy:
- mkdir -p ~/.ssh
- openssl aes-256-cbc -K $encrypted_c49e2c465c08_key -iv $encrypted_c49e2c465c08_iv
-in district-builder.pem.enc -out ~/.ssh/district-builder.pem -d
- cp django/publicmapping/config/config.xml deployment/user-data/config.xml
- mv ./data/districtbuilder_data.zip deployment/user-data/
deploy:
- provider: script
skip_cleanup: true
script: DB_SETTINGS_BUCKET=${PROD_DB_SETTINGS_BUCKET} DB_DOCKER_HOST=${PROD_DB_DOCKER_HOST} scripts/deploy
on:
repo: PublicMapping/DistrictBuilder
branch: master
- provider: script
skip_cleanup: true
script: scripts/deploy
on:
repo: PublicMapping/DistrictBuilder
branch: develop
after_deploy:
- docker-compose -f docker-compose.ci.yml run --rm --entrypoint git terraform clean -fdx
- rm -f ~/.ssh/district-builder.pem