-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
40 lines (37 loc) · 962 Bytes
/
.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
test frontend:
stage: test
image: node:13.8.0-buster
before_script:
- cd frontend
- yarn install --pure-lockfile --cache-folder .yarn-cache
script:
- yarn test --runInBand
cache:
paths:
- frontend/node_modules/
- frontend/.yarn-cache/
.dind:
image: docker:19.03.5
services:
- docker:19.03.5-dind
variables:
DOCKER_HOST: tcp://docker:2375
DOCKER_DRIVER: overlay2
before_script:
- apk add --no-cache docker-compose
test backend:
stage: test
extends: .dind
script:
- docker-compose -f docker-compose.test.yml up --exit-code-from backend_test
push images:
stage: deploy
extends: .dind
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker-compose -f docker-compose.ci.yml build
--build-arg VERSION=$CI_COMMIT_SHA
--build-arg BRANCH=$CI_COMMIT_REF_NAME
- docker-compose -f docker-compose.ci.yml push
only:
- production