-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
71 lines (62 loc) · 1.3 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
image: code.andrena.de:5050/marcosieben/nx-article-demo:latest # Dein benutzerdefiniertes Docker-Image
stages:
- prepare
- test
- build
- deploy
variables:
GRADLE_USER_HOME: "$CI_PROJECT_DIR/.gradle"
FF_USE_FASTZIP: "true"
CACHE_COMPRESSION_LEVEL: "fastest"
NXCACHE_S3_READ_ONLY: false
default:
cache: &global_cache
key: $CI_COMMIT_REF_SLUG
paths:
- node_modules/
- .gradle/wrapper/
- .gradle/caches/
install_dependencies:
stage: prepare
script:
- npm ci
- npx nx run-many --target=installDependencies
cache:
<<: *global_cache
policy: pull-push
test:
stage: test
dependencies:
- install_dependencies
script:
- npx nx run-many --target=test
cache:
<<: *global_cache
policy: pull
build:
stage: build
needs:
- install_dependencies
script:
- npx nx run-many --target=build
artifacts:
paths:
- apps/backend/build/libs
- dist/apps/frontend/browser
cache:
<<: *global_cache
policy: pull
deploy_backend:
stage: deploy
dependencies:
- build
script:
- echo "Deploying BE - $(du -sh apps/backend/build/libs | cut -f1)"
cache: []
deploy_frontend:
stage: deploy
dependencies:
- build
script:
- echo "Deploying FE - $(du -sh dist/apps/frontend/browser | cut -f1)"
cache: []