This repository has been archived by the owner on Mar 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
274 lines (240 loc) · 6.21 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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
stages:
- build
- test
- docs
before_script:
- mkdir -p --mode=0777 artifacts artifacts/docs artifacts/htmlcov
variables:
CONTAINER_TEST_IMAGE: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-ci
CONTAINER_IMAGE_DEV: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
CONTAINER_RELEASE_IMAGE: $CI_REGISTRY_IMAGE:latest
build:
stage: build
image: docker/compose:latest
services:
- docker:dind
script:
- cd docker
- docker-compose build wildland-client-base
- docker-compose build --parallel wildland-client wildland-client-ci
- docker tag wildland-client-ci $CONTAINER_TEST_IMAGE
- docker tag wildland-client $CONTAINER_IMAGE_DEV
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker push $CONTAINER_TEST_IMAGE
- docker push $CONTAINER_IMAGE_DEV
gcp:
stage: build
image: docker/compose:latest
when: manual
allow_failure: true
services:
- docker:dind
script:
- echo $CI_COMMIT_SHA > git_commit_sha.txt
- cd docker
- docker-compose build wildland-client-base
- docker-compose build wildland-client-gcp
- docker tag wildland-client-gcp:latest eu.gcr.io/single-bindery-317213/wildland-client-gcp:latest
- echo $GCP_DOCKER_REPO_JSON | base64 -d | docker login -u _json_key --password-stdin https://eu.gcr.io
- docker push eu.gcr.io/single-bindery-317213/wildland-client-gcp:latest
lint:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/ci-lint
mypy-wildland:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/ci-mypy-wildland
artifacts:
reports:
junit: artifacts/wildland-mypy.xml
mypy-plugins:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/ci-mypy-plugins
artifacts:
reports:
junit: artifacts/wildland-mypy-plugins.xml
pytest:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- export PYTEST_ADDOPTS="--color=yes"
- ./ci/ci-pytest
after_script:
- /home/user/env/bin/python3 -m coverage combine
- /home/user/env/bin/python3 -m coverage xml -o artifacts/coverage.xml
- /home/user/env/bin/python3 -m coverage html -d artifacts/htmlcov
- /home/user/env/bin/python3 -m coverage report --include=wildland/* --omit=wildland/storage_backends/transpose.py
- sed -i -e '/<source><\/source>/d' artifacts/coverage.xml
coverage: '/TOTAL.*\s(\d+)%/'
artifacts:
when: always
paths:
- artifacts/htmlcov/
- artifacts/sync-daemon.log
reports:
junit: artifacts/wildland.xml
cobertura: artifacts/coverage.xml
transpose-test:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/ci-transpose
after_script:
- /home/user/env/bin/python3 -m coverage combine
- /home/user/env/bin/python3 -m coverage xml -o artifacts/coverage.xml
- /home/user/env/bin/python3 -m coverage report --include=wildland/storage_backends/transpose.py
- sed -i -e '/<source><\/source>/d' artifacts/coverage.xml
coverage: '/TOTAL.*\s(\d+)%/'
artifacts:
reports:
cobertura: artifacts/coverage.xml
.plugin_test:
stage: test
image: $CONTAINER_TEST_IMAGE
after_script:
- /home/user/env/bin/python3 -m coverage combine
- /home/user/env/bin/python3 -m coverage xml -o artifacts/coverage.xml
- /home/user/env/bin/python3 -m coverage report --include=plugins/${CI_JOB_NAME%-test*}/*
- sed -i -e '/<source><\/source>/d' artifacts/coverage.xml
coverage: '/TOTAL.*\s(\d+)%/'
artifacts:
reports:
cobertura: artifacts/coverage.xml
categorization-proxy-test:
extends: .plugin_test
script:
- ./ci/ci-categorization-proxy
git-test:
extends: .plugin_test
script:
- ./ci/ci-git
ipfs-test:
extends: .plugin_test
script:
- ./ci/ci-ipfs
sshfs-test:
extends: .plugin_test
script:
- ./ci/ci-sshfs
s3-test:
extends: .plugin_test
script:
- ./ci/ci-s3
redis-test:
extends: .plugin_test
script:
- ./ci/ci-redis
webdav-test:
extends: .plugin_test
script:
- ./ci/ci-webdav
encrypted-test:
extends: .plugin_test
script:
- ./ci/ci-encrypted
dropbox-test-legacy:
extends: .plugin_test
allow_failure: true
script:
- ./ci/ci-dropbox "$DROPBOX_TEST_ACCESS_TOKEN"
dropbox-test:
extends: .plugin_test
allow_failure: true
script:
- ./ci/ci-dropbox "" "$DROPBOX_TEST_APP_KEY" "$DROPBOX_TEST_REFRESH_TOKEN"
googledrive-test:
extends: .plugin_test
# until https://gitlab.com/wildland/wildland-client/-/issues/730 is fixed
allow_failure: true
script:
- ./ci/ci-googledrive "$GOOGLEDRIVE_TEST_ACCESS_TOKEN"
zip-archive-test:
extends: .plugin_test
script:
- ./ci/ci-zip-archive
howto-quick-start-test:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/howto-quick-start
howto-sharing-test:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/howto-sharing-and-access-control
howto-forest-creation-test:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/howto-forest-creation
howto-group-users-test:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/howto-group-users
howto-encryption-backend-test:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/howto-encryption-backend
howto-cache-test:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- timeout 15m ./ci/howto-cache
artifacts:
when: always
paths:
- artifacts/sync-daemon.log
user-directory-test:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/howto-user-directory
group-users-test:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/howto-group-users-with-user-path
smoke-test:
stage: test
image: docker/compose:latest
services:
- docker:dind
script:
- ./wildland-docker.sh ci/ci-smoke-test < /dev/null
pages-test:
stage: test
image: $CONTAINER_TEST_IMAGE
except:
- master
script:
- ./ci/ci-docs
artifacts:
paths:
- artifacts/docs
pages:
stage: docs
image: $CONTAINER_TEST_IMAGE
dependencies:
- pytest
only:
- master
script:
- ./ci/ci-docs
- cp -r artifacts/docs/html public
- cp -r artifacts/docs/man public/man
- cp -r artifacts/htmlcov public/coverage
artifacts:
paths:
- public/
subcontainer-remounter:
stage: test
image: $CONTAINER_TEST_IMAGE
script:
- ./ci/ci-remounter