forked from 3liz/lizmap-web-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
241 lines (227 loc) · 4.75 KB
/
.gitlab-ci.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
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
stages:
- build
- tests
- package
- docker-image
- deploy
- release
- post-release
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- lizmap/vendor/
- assets/node_modules/
build:
image: ${REGISTRY_URL}/factory-ci-runner:fabric-ci
stage: build
script:
- make build
environment:
name: snap
artifacts:
name: "lizmap-web-client-${CI_COMMIT_SHA}-js"
paths:
- lizmap/www/assets/js/lizmap.js
- lizmap/www/assets/js/lizmap.js.map
- lizmap/www/assets/js/atlas.js
- lizmap/www/assets/js/atlas.js.map
- lizmap/www/assets/js/attributeTable.js
- lizmap/www/assets/js/attributeTable.js.map
- lizmap/www/assets/js/bottom-dock.js
- lizmap/www/assets/js/bottom-dock.js.map
- lizmap/www/assets/js/edition.js
- lizmap/www/assets/js/edition.js.map
- lizmap/www/assets/js/filter.js
- lizmap/www/assets/js/filter.js.map
- lizmap/www/assets/js/map.js
- lizmap/www/assets/js/map.js.map
- lizmap/www/assets/js/map-projects.js
- lizmap/www/assets/js/map-projects.js.map
- lizmap/www/assets/js/switcher-layers-actions.js
- lizmap/www/assets/js/switcher-layers-actions.js.map
- lizmap/www/assets/js/timemanager.js
- lizmap/www/assets/js/timemanager.js.map
- lizmap/www/assets/js/view.js
- lizmap/www/assets/js/view.js.map
- lizmap/www/assets/js/137.bundle.js
- lizmap/www/assets/js/137.bundle.js.map
- lizmap/www/assets/js/BufferOp.bundle.js
- lizmap/www/assets/js/BufferOp.bundle.js.map
- lizmap/www/assets/js/OLparser.bundle.js
- lizmap/www/assets/js/OLparser.bundle.js.map
tags:
- fabric
tests:
image: ${REGISTRY_URL}/factory-ci-runner:fabric-ci
stage: tests
script:
- make tests
environment:
name: snap
cache:
key: "tests-$CI_COMMIT_REF_SLUG"
paths:
- tests/units/vendor/
- tests/units/composer.lock
dependencies:
- build
tags:
- fabric
package:
image: ${REGISTRY_URL}/factory-ci-runner:fabric-ci
stage: package
script:
- make clean ci_package
environment:
name: snap
dependencies:
- build
- tests
artifacts:
name: "lizmap-web-client-${CI_COMMIT_SHA}"
paths:
- "build/*.zip"
- "build/MANIFEST"
- "build/*.manifest"
only:
- /^release_.*$/
- master
- tags
tags:
- fabric
docker-image-unstable:
stage: docker-image
script:
- make docker-build-ci docker-deliver docker-clean
#- make docker-hub
environment:
name: snap
artifacts:
paths:
- docker/factory.manifest
dependencies:
- package
only:
- /^release_.*$/
- master
except:
- tags
tags:
- factory-dind
docker-image-release:
stage: docker-image
script:
- make docker-build-ci docker-deliver docker-clean-all DO_RELEASE=y
environment:
name: snap
artifacts:
paths:
- docker/factory.manifest
dependencies:
- package
only:
- tags
tags:
- factory-dind
deploy-package-unstable:
image: ${REGISTRY_URL}/factory-ci-runner:fabric-ci
stage: deploy
script:
- make deploy_download
- make saas_deploy_snap
environment:
name: snap
dependencies:
- package
only:
- /^release_.*$/
- master
except:
- tags
tags:
- fabric
deploy-docker-unstable:
image: ${REGISTRY_URL}/factory-ci-runner:build-package
stage: deploy
script:
- update-service lizmap
environment:
name: snap
dependencies:
- docker-image-unstable
only:
- /^release_.*$/
- master
except:
- tags
tags:
- factory-dind
deploy-quick-release:
image: ${REGISTRY_URL}/factory-ci-runner:fabric-ci
stage: release
script:
- make saas_release DO_RELEASE=y
environment:
name: production
dependencies:
- package
only:
- /^release_.*$/
tags:
- fabric
except:
- tags
when: manual
deploy-release:
image: ${REGISTRY_URL}/factory-ci-runner:fabric-ci
stage: release
script:
- make deploy_download_stable
- make saas_release DO_RELEASE=y
environment:
name: production
dependencies:
- package
tags:
- fabric
only:
- tags
when: manual
docker-release:
stage: release
script:
- make docker-release
environment:
name: production
dependencies:
- docker-image-release
when: manual
only:
- tags
tags:
- factory-dind
tickets:
stage: release
only:
- tags
image:
name: $REGISTRY_URI/infra/ci-tools:latest
script:
- create_ticket.py
tags:
- factory-plain
variables:
FACTORY_PRODUCT_NAME: lizmap-web-client
FACTORY_PACKAGE_TYPE: application
github_release:
stage: post-release
needs:
- job: deploy-release
only:
- tags
image:
name: $REGISTRY_URI/infra/ci-tools:latest
script:
- lwc_release.py
tags:
- factory-plain