-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
128 lines (108 loc) · 2.56 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
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- dependencies
- modules
- build
- deploy
webworker-dependencies:
stage: dependencies
image: node:lts
script:
- cd SOSML-webworker && npm ci
artifacts:
expire_in: 1 day
paths:
- SOSML-webworker/node_modules
frontend-dependencies:
stage: dependencies
image: node:lts
script:
- cd SOSML-frontend/frontend && npm ci
artifacts:
expire_in: 1 day
paths:
- SOSML-frontend/frontend/node_modules
backend-dependencies:
stage: dependencies
image: node:lts
script:
- npm ci
artifacts:
expire_in: 1 day
paths:
- node_modules
build-webworker:
stage: modules
image: node:lts
script:
- cd SOSML-webworker && npm run dist
dependencies:
- webworker-dependencies
artifacts:
expire_in: 1 day
paths:
- SOSML-webworker/build/webworker.js
build-frontend:
stage: build
image: node:lts
script:
- cp SOSML-webworker/build/webworker.js SOSML-frontend/frontend/public/webworker.js
- ./configure.sh
- cd SOSML-frontend/frontend && npm run build
dependencies:
- build-webworker
- frontend-dependencies
artifacts:
expire_in: 2 weeks
paths:
- SOSML-frontend/frontend/build/
- SOSML-frontend/frontend/public/
.deploy-web: &deploy-web
stage: deploy
image: udsdepend/gitlab-ssh-deploy
tags:
- secret
dependencies:
- build-frontend
deploy-web-main:
<<: *deploy-web
only:
- main@sosml/backend
script:
- /ssh-deploy.sh './deploy-web.sh main' '~/deploy-cache/web/main' ./deploy-web.sh ./SOSML-frontend/frontend/build/
environment:
name: development-web
url: https://sosml.org/
deploy-web-exp:
<<: *deploy-web
only:
- exp@sosml/backend
script:
- /ssh-deploy.sh './deploy-web.sh exp' '~/deploy-cache/web/exp' ./deploy-web.sh ./SOSML-frontend/frontend/build/
environment:
name: development-web
url: https://exp.sosml.org/
deploy-web-dev:
<<: *deploy-web
only:
- dev@sosml/backend
script:
- /ssh-deploy.sh './deploy-web.sh dev' '~/deploy-cache/web/dev' ./deploy-web.sh ./SOSML-frontend/frontend/build/
environment:
name: development-web
url: https://dev.sosml.org/
deploy-server:
stage: deploy
image: udsdepend/gitlab-ssh-deploy
tags:
- secret
only:
- main@sosml/backend
dependencies:
- backend-dependencies
script:
- /ssh-deploy.sh './deploy-server.sh' '~/deploy-cache/server' ./deploy-server.sh ./src config.js ./node_modules
environment:
name: production-server
url: https://pseuCo.com/api/