forked from linagora/linshare-editor-onlyoffice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
110 lines (98 loc) · 2.91 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
# vim: syntax=yaml textwidth=120 expandtab tabstop=2 softtabstop=2 shiftwidth=2 autoindent
stages:
- prepare
- linters
- build
- test
- deploy
.cache-tpl: &cache-tpl
key: "$CI_COMMIT_REF_SLUG"
paths:
- node_modules
policy: pull
.build-tpl: &build-tpl
# we need to use this specific version of node
# otherwise you will get the following error during the tests:
# TypeError: Cannot assign to read only property
image: node:10
tags:
- docker
cache:
<<: *cache-tpl
.test-tpl: &test-tpl
<<: *build-tpl
except:
variables:
- $SKIP_TESTS
refs:
- master@linagora/lgs/linshare/products/linshare-editor-onlyoffice
- tags@linagora/lgs/linshare/products/linshare-editor-onlyoffice
- /^release-.*/@linagora/lgs/linshare/products/linshare-editor-onlyoffice
prepare:
<<: *build-tpl
stage: prepare
cache:
<<: *cache-tpl
policy: pull-push
script:
- npm install
except:
variables:
- $SKIP_PREPARE
refs:
- master@linagora/lgs/linshare/products/linshare-editor-onlyoffice
- tags@linagora/lgs/linshare/products/linshare-editor-onlyoffice
- /^release-.*/@linagora/lgs/linshare/products/linshare-editor-onlyoffice
linters:
<<: *build-tpl
stage: linters
script:
- npm run lint
except:
variables:
- $SKIP_LINTERS
refs:
- master@linagora/lgs/linshare/products/linshare-editor-onlyoffice
- tags@linagora/lgs/linshare/products/linshare-editor-onlyoffice
- /^release-.*/@linagora/lgs/linshare/products/linshare-editor-onlyoffice
check_author:
image: docker-registry.linagora.com:5000/lgs-releases/gitlab-integrity-checks:latest
stage: prepare
variables:
GIT_DEPTH: "1"
tags:
- ultralight
script:
- check_author.py check "$GITLAB_USER_EMAIL" "$GITLAB_USER_NAME" --no-accents
except:
refs:
- master@linagora/lgs/linshare/products/linshare-editor-onlyoffice
- tags@linagora/lgs/linshare/products/linshare-editor-onlyoffice
- /^release-.*/@linagora/lgs/linshare/products/linshare-editor-onlyoffice
test_unit:
<<: *test-tpl
stage: test
script:
- npm run test:unit
deploy-snapshot:
image: docker-registry.linagora.com:5000/linshare-releases/linshare-build-helper:latest
stage: deploy
tags:
- docker
script:
- mvn -P hard-clean clean package deploy
- CHANNEL=snapshots
- VERSION=$(mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q)
- curl -s -X POST
-F "token=${BUILD_DOCKER_IMAGE_TOKEN}"
-F "ref=${CI_COMMIT_REF_NAME}"
-F "variables[VERSION]=${VERSION}"
-F "variables[CHANNEL]=${CHANNEL}"
https://ci.linagora.com/api/v4/projects/1766/trigger/pipeline
except:
variables:
- $SKIP_DEPLOY
only:
refs:
- master@linagora/lgs/linshare/products/linshare-editor-onlyoffice
- /^maintenance-.*/@linagora/lgs/linshare/products/linshare-editor-onlyoffice