-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
59 lines (54 loc) · 1.05 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
variables:
DOCKER_DRIVER: overlay2
stages:
- build_static
- build
- deploy
build_apps:
image: node:16-alpine
stage: build_static
parallel:
matrix:
- APP: cgraph
- APP: fsgraph
- APP: gisgraph
cache:
key: "npm-${APP}"
paths:
- ${APP}/node_modules
variables:
NODE_ENV: production
before_script:
- cd ${APP}
- npm run update-locals
- npm ci --include=dev
- cd ..
script:
- cd ${APP}
- npm run release
- cd ..
artifacts:
paths:
- demo
expire_in: 1 day
build_image:
stage: build
image: docker
before_script:
- docker info
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN docker.semograph.com
- docker-compose build --pull
- docker-compose push
only:
- master
deploy_prod:
stage: deploy
image: docker
variables:
DOCKER_HOST: tcp://10.0.6.2:2376
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN docker.semograph.com
- docker stack deploy -c docker-compose.yml graph --with-registry-auth
only:
- master