-
Notifications
You must be signed in to change notification settings - Fork 5
/
.gitlab-ci.yml
80 lines (69 loc) · 1.32 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
image: node:carbon-alpine
cache:
paths:
- node_modules/
stages:
- test
- build
- deploy
# Stage I
# Testing Phase:
# This is where the main code is tested.
# Other options like code coverage, etc are also written in this phase
test:
stage: test
script:
- rm -rf package-lock.json
- npm install
- npm install -g codacy-coverage --save
- npm run jest:update
- npm run test:unit
- npm run lint
- npm run coverage
# Stage II
# Build Phase:
# This is where the main code is built
build:
stage: build
script:
- rm -rf package-lock.json
- npm install @vue/cli
- npm install
- npm run build
artifacts:
paths:
#build folder
- dist/
# Stage III
# Release Phase
# At this stage our application is deployed
.release:
stage: deploy
script:
- rm -rf package-lock.json
- npm install
- npm i -g netlify-cli
- npm run build
dependencies:
- build
release_development:
extends: .release
environment:
name: development
url: https://arbc-dev.netlify.com/
only:
- develop
release_staging:
extends: .release
environment:
name: staging
url: https://arbc-stg.netlify.com/
only:
- develop
release_production:
extends: .release
environment:
name: production
url: https://arbc.netlify.com/
only:
- master