-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
51 lines (47 loc) · 1.04 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
variables:
DOCKER_DRIVER: overlay2
stages:
- build_static
- build
- deploy
build_scivi_static:
image: node:18
stage: build_static
cache:
key: "static-npm"
paths:
- cgraph/node_modules
before_script:
- cd client
- npm ci
- cd ..
script:
- NODE_ENV=production make
artifacts:
paths:
- client/lib
- kb
expire_in: 1 day
build_image:
stage: build
image: dem0n3d/docker-compose
before_script:
- docker info
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN docker.semograph.com
- docker-compose -f docker-compose.prod.yml build --pull
- docker push docker.semograph.com/semograph/scivi/app:${CI_COMMIT_REF_NAME}
dependencies:
- build_scivi_static
only:
- master
deploy_prod:
stage: deploy
image: docker:latest
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.prod.yml scivi --with-registry-auth
only:
- master