-
Notifications
You must be signed in to change notification settings - Fork 9
/
.travis.yml
122 lines (113 loc) · 3.37 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
if: (branch = development) OR (branch = master) OR (branch = release/alpha) OR (type = pull_request) OR (tag IS present)
language: node_js
node_js: '12'
before_install:
- npm install
# Needed to deploy pull request and releases
- pip install awscli --upgrade --user
cache:
directories:
- "$HOME/.npm"
install:
- npm install -g sass@1.22.10
before_script:
# ONBOARDING_MODE="TIERED" to enable tiered onboarding testing/dev
- if [ "$TRAVIS_BRANCH" == "development" ]; then export NETWORK="rinkeby" NODE_ENV=development;
else export NETWORK="mainnet" NODE_ENV=production;
fi;
- npm run compile && npm run build
matrix:
include:
- if: branch =~ /^master$/ OR tag IS present
env:
- DEPLOY_ENV=production
- WHITELIST_API=https://sight-whitelist.gnosis.io/api
- OPERATOR_API=https://sight-operator.gnosis.io/api
- if: branch =~ /^master$/ OR tag IS present
env:
- DEPLOY_ENV=staging
- WHITELIST_API=https://sight-whitelist.mainnet.staging.gnosisdev.com/api
- OPERATOR_API=https://sight-operator.staging.gnosisdev.com/api
- if: NOT (branch =~ /^master$/) AND NOT (tag IS present)
env: WHITELIST_API=https://sight-whitelist.staging.gnosisdev.com/api
script:
- echo "Skip tests" # no test cases for the project
deploy:
# DEVELOPMENT /markets deployment
- provider: s3
bucket: $DEV_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: dist
upload-dir: markets
on:
branch: development
# DEVELOPMENT /app deployment for KYC forms
- provider: s3
bucket: $DEV_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: dist
upload-dir: app
on:
branch: development
# STAGING deployment
- provider: s3
bucket: $STAGING_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: dist
upload-dir: current/markets
on:
branch: master
# STAGING_WITH_LANDING deployment
- provider: s3
bucket: $STAGING_WITH_LANDING_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: dist
upload-dir: current/app
on:
branch: master
# ALPHA STAGING deployment
- provider: s3
bucket: $ALPHA_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: dist
upload-dir: current
on:
branch: release/alpha
# Prepare legacy production deployment
- provider: s3
bucket: $STAGING_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: dist
upload-dir: releases/$TRAVIS_TAG
on:
tags: true
- provider: script
script: bash travis/prepare_production_deployment.sh
on:
tags: true
# Prepare alpha production deployment
- provider: s3
bucket: $STAGING_BUCKET_NAME
access_key_id: $AWS_ACCESS_KEY_ID
secret_access_key: $AWS_SECRET_ACCESS_KEY
skip_cleanup: true
local_dir: dist
upload-dir: releases/alpha
on:
branch: release/alpha
- provider: script
script: TRAVIS_TAG=alpha bash travis/prepare_production_deployment.sh
on:
branch: release/alpha