-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
56 lines (52 loc) · 1.09 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
stages:
- build
# - test
- deploy
build iti0203-frontend:
stage: build
image: node:11-alpine
cache:
paths:
- node_modules
before_script:
- npm install
- npm audit fix
- npm update
script:
- ng config -g cli.warnings.versionMismatch false
- node --max_old_space_size=8192 ./node_modules/@angular/cli/bin/ng build --prod --build-optimizer
# - ng build --prod
artifacts:
paths:
- dist/
tags:
- films-app
variables:
api:
localhost/api
#karma-test iti0203-frontend:
# stage: test
# image: node:11-alpine
# allow_failure: false
# before_script:
# - rm ./package-lock.json
# - npm install
# - npm update
# script:
# - ng test --no-watch --code-coverage --no-progress --browsers=ChromeHeadlessCI
# coverage: '/Lines \W+: (\d+\.\d+)%.*/'
# artifacts:
# paths:
# - coverage/
# tags:
# - films-app
deploy iti0203-frontend:
stage: deploy
only:
- master
tags:
- films-app
script:
- mkdir -p ~/front-deployment
- rm -rf ~/front-deployment/*
- cp -r dist/iti0203-frontend/. ~/front-deployment