-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
204 lines (179 loc) · 4.97 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
language: node_js
node_js: "10.15"
cache: yarn
_production-env: &production-env
ENVIRONMENT: production
RANCHER_CLUSTERID: c-gxsr7
_staging-env: &staging-env
ENVIRONMENT: staging
RANCHER_CLUSTERID: c-rc5kp
_production-job: &production-job
name: SERVICE_NAME
script: scripts/deploy.js SERVICE_NAME
install: skip
env:
<<: *production-env
_staging-job: &staging-job
name: SERVICE_NAME
script: scripts/deploy.js SERVICE_NAME
install: skip
env:
<<: *staging-env
stages:
- name: test
- name: production-started
if: tag =~ /^v\d+\.\d+\.\d+$/
- name: production-group1
if: tag =~ /^v\d+\.\d+\.\d+$/
- name: production-group2
if: tag =~ /^v\d+\.\d+\.\d+$/
- name: production-group3
if: tag =~ /^v\d+\.\d+\.\d+$/
- name: production-group4
if: tag =~ /^v\d+\.\d+\.\d+$/
- name: production-group5
if: tag =~ /^v\d+\.\d+\.\d+$/
- name: production-finished
if: tag =~ /^v\d+\.\d+\.\d+$/
- name: staging-started
if: tag is present
- name: staging-group1
if: tag is present
- name: staging-group2
if: tag is present
- name: staging-group3
if: tag is present
- name: staging-group4
if: tag is present
- name: staging-group5
if: tag is present
- name: staging-finished
if: tag is present
jobs:
include:
- stage: test
env:
NODE_ENV: test
- stage: production-started
name: Deployment Started
script: npx @base-cms/website-deployment-tool notify-started
install: skip
env:
<<: *production-env
- stage: staging-started
name: Deployment Started
script: npx @base-cms/website-deployment-tool notify-started
install: skip
env:
<<: *staging-env
#############################
# vvv ADD SERVICES HERE vvv #
#############################
# GROUP 1
- <<: *production-job
stage: production-group1
name: IP Service
script: scripts/deploy.js ip
- <<: *staging-job
stage: staging-group1
name: IP Service
script: scripts/deploy.js ip
- <<: *production-job
stage: production-group1
name: Locale Service
script: scripts/deploy.js locale
- <<: *staging-job
stage: staging-group1
name: Locale Service
script: scripts/deploy.js locale
- <<: *production-job
stage: production-group1
name: Mailer Service
script: scripts/deploy.js mailer
- <<: *staging-job
stage: staging-group1
name: Mailer Service
script: scripts/deploy.js mailer
- <<: *production-job
stage: production-group1
name: Token Service
script: scripts/deploy.js token
- <<: *staging-job
stage: staging-group1
name: Token Service
script: scripts/deploy.js token
- <<: *production-job
stage: production-group1
name: Organization Service
script: scripts/deploy.js organization
- <<: *staging-job
stage: staging-group1
name: Organization Service
script: scripts/deploy.js organization
# GROUP 2
- <<: *production-job
stage: production-group2
name: User Service
script: scripts/deploy.js user
- <<: *staging-job
stage: staging-group2
name: User Service
script: scripts/deploy.js user
- <<: *production-job
stage: production-group2
name: Application Service
script: scripts/deploy.js application
- <<: *staging-job
stage: staging-group2
name: Application Service
script: scripts/deploy.js application
# GROUP 3
- <<: *production-job
stage: production-group3
name: Export Service
script: scripts/deploy.js export
- <<: *staging-job
stage: staging-group3
name: Export Service
script: scripts/deploy.js export
- <<: *production-job
stage: production-group3
name: Membership Service
script: scripts/deploy.js membership
- <<: *staging-job
stage: staging-group3
name: Membership Service
script: scripts/deploy.js membership
# GROUP 4
- <<: *production-job
stage: production-group4
name: GraphQL Service
script: scripts/deploy.js graphql
- <<: *staging-job
stage: staging-group4
name: GraphQL Service
script: scripts/deploy.js graphql
# GROUP 5
- <<: *production-job
stage: production-group5
name: Manage UI Service
script: scripts/deploy.js manage
- <<: *staging-job
stage: staging-group5
name: Manage UI Service
script: scripts/deploy.js manage
#############################
# ^^^ ADD SERVICES HERE ^^^ #
#############################
- stage: production-finished
name: Deployment Finished
script: npx @base-cms/website-deployment-tool notify-finished
install: skip
env:
<<: *production-env
- stage: staging-finished
name: Deployment Finished
script: npx @base-cms/website-deployment-tool notify-finished
install: skip
env:
<<: *staging-env