-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
154 lines (135 loc) · 3.55 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
language: node_js
node_js: '8.10'
branches:
only:
- dev
- master
#addons:
# postgresql: "10"
# apt:
# packages:
# - postgresql-10-postgis-2.4
# - proj-bin
# - postgresql-10-postgis-2.4-scripts
#before_install:
# - sudo cp /etc/postgresql/9.6/main/pg_hba.conf /etc/postgresql/10/main/pg_hba.conf
# - sudo /etc/init.d/postgresql restart
# - export PGPORT=5433
# - if [[ $TRAVIS_BRANCH != 'master' ]]; then BRANCH='dev'; else BRANCH='master'; fi;
# - export PGDATABASE=cognicity_server_testing ; git clone -b $BRANCH https://github.com/urbanriskmap/cognicity-schema.git && cd cognicity-schema && bash build/run.sh && cd -
install:
- npm install
script:
# - npm run integration
- npm run test && npm run coverage
before_deploy:
- npm run build
deploy:
- provider: lambda
function_name: "cognicity-sensors-add-sensor-dev"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/addSensor"
handler_name: "default"
on:
branch: dev
- provider: lambda
function_name: "cognicity-sensors-add-data-dev"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/addSensorData"
handler_name: "default"
on:
branch: dev
- provider: lambda
function_name: "cognicity-sensors-delete-data-dev"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/deleteSensorData"
handler_name: "default"
on:
branch: dev
- provider: lambda
function_name: "cognicity-sensors-get-sensors-dev"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/getSensors"
handler_name: "default"
on:
branch: dev
- provider: lambda
function_name: "cognicity-sensors-get-data-dev"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/getSensorData"
handler_name: "default"
on:
branch: dev
- provider: lambda
function_name: "cognicity-sensors-monitoring-dev"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/monitoring"
handler_name: "default"
on:
branch: dev
- provider: lambda
function_name: "cognicity-sensors-add-sensor-prod"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/addSensor"
handler_name: "default"
on:
branch: master
- provider: lambda
function_name: "cognicity-sensors-add-data-prod"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/addSensorData"
handler_name: "default"
on:
branch: master
- provider: lambda
function_name: "cognicity-sensors-delete-data-prod"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/deleteSensorData"
handler_name: "default"
on:
branch: master
- provider: lambda
function_name: "cognicity-sensors-get-sensors-prod"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/getSensors"
handler_name: "default"
on:
branch: master
- provider: lambda
function_name: "cognicity-sensors-get-data-prod"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/getSensorData"
handler_name: "default"
on:
branch: master
- provider: lambda
function_name: "cognicity-sensors-monitoring-prod"
region: $AWS_REGION
role: $AWS_LAMBDA_ROLE
runtime: "nodejs8.10"
module_name: "bin/functions/monitoring"
handler_name: "default"
on:
branch: master