-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
74 lines (69 loc) · 1.53 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
image: node:10-stretch
stages:
- test
- swagger
- deploy-swagger
- deploy_dev
test:
stage: test
tags:
- docker
image: node:10-stretch
services:
- mongo:3.4
- elasticsearch:2.4
- redis:3
- rabbitmq:3.6
- linagora/esn-sabre:latest
script:
- npm i
- npm update
- node_modules/bower/bin/bower i --allow-root
- node_modules/grunt/bin/grunt --chunk=1 --ci
swagger:
stage: swagger
tags:
- docker
script:
- npm i
- npm prune
- ./node_modules/.bin/grunt swagger-generate
- ./node_modules/.bin/grunt swagger-validate
artifacts:
paths:
- ./doc/REST_API/swagger/group-swagger.json
deploy-swagger:
stage: deploy-swagger
tags:
- deployment
- api.open-paas.org
- shell
environment:
name: api
url: https://api.open-paas.org
only:
- master@linagora/lgs/openpaas/linagora.esn.group
script:
- perl -i -pe's/"host":"localhost:8080"/"schemes":["https"],"host":"demo.open-paas.org"/' ./doc/REST_API/swagger/group-swagger.json
- cp ./doc/REST_API/swagger/group-swagger.json /var/www/html
deploy_dev:
stage: deploy_dev
tags:
- dev.open-paas.org
- deployment
environment:
name: dev
url: https://dev.open-paas.org
only:
- master
script:
- cd /srv/${CI_PROJECT_NAME}
- git fetch --all
- git checkout ${CI_COMMIT_SHA}
- npm install --production
- npm update --production
- npm prune
- bower install --production
- bower prune
- git checkout -- .
- sudo /etc/init.d/rse.dev restart