-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
161 lines (148 loc) · 2.63 KB
/
.gitlab-ci.yml
File metadata and controls
161 lines (148 loc) · 2.63 KB
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
cache:
untracked: true
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
stages:
- install
- lints
- tests
- build_dev
- build_production
- azure_upload
Initialization:
stage: install
script: yarn
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
tags:
- node
Lint:
stage: lints
script: yarn lint
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
tags:
- node
Flow:
stage: lints
script: yarn flow
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
tags:
- node
Tests:
stage: tests
script: yarn test:coverage
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
tags:
- node
### BUILD DEV ###
Build Client Dev:
stage: build_dev
script: yarn build:client:dev
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
- dist/
tags:
- node
only:
- dev
except:
- tags
variables:
PROJECT_ENV: "development"
SENTRY_ORG: "$SENTRY_ORG"
SENTRY_AUTH_TOKEN: "$SENTRY_AUTH_TOKEN"
SENTRY_PROJECT: "blog-client-dev"
Build Server Dev:
stage: build_dev
script: yarn build:server:dev
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
- dist/
tags:
- node
only:
- dev
except:
- tags
variables:
PROJECT_ENV: "development"
SENTRY_ORG: "$SENTRY_ORG"
SENTRY_AUTH_TOKEN: "$SENTRY_AUTH_TOKEN"
SENTRY_PROJECT: "blog-client-dev"
### BUILD PRODUCTION ###
Build Client Production:
stage: build_production
script: yarn build:client:production
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
- dist/
tags:
- node
only:
- release
- tags
- master
except:
- dev
variables:
NO_SENTRY: "true"
PROJECT_ENV: "production"
SENTRY_ORG: "$SENTRY_ORG"
SENTRY_AUTH_TOKEN: "$SENTRY_AUTH_TOKEN"
SENTRY_PROJECT: "blog-client-prod"
Build Server Production:
stage: build_production
script: yarn build:server:production
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
- dist/
tags:
- node
only:
- release
- tags
- master
except:
- dev
variables:
NO_SENTRY: "true"
PROJECT_ENV: "production"
SENTRY_ORG: "$SENTRY_ORG"
SENTRY_AUTH_TOKEN: "$SENTRY_AUTH_TOKEN"
SENTRY_PROJECT: "blog-client-prod"
### Azure Actions ###
Upload to Azure Artifacts:
stage: azure_upload
script: ./azure_upload.sh ${CI_PROJECT_NAMESPACE}-${CI_PROJECT_NAME}
cache:
key: "$CI_BUILD_REF_NAME"
paths:
- node_modules/
- dist/
tags:
- node
only:
- tags
- dev
- release
- master